Thankfully, changing column data types is not an everyday task, but when we need to do it, we must know all the details so that we can perform the conversion on a production system without any errors.
Changing the data type of a column
Getting ready
Let's start with a simple example of a table, as follows:
postgres=# select * from birthday;
This gives the following output:
name | dob
-------+--------
simon | 690926
(1 row)
The preceding table was created using this command:
CREATE TABLE birthday
( name TEXT, dob INTEGER);
How to do it...
Let's...