I have a large table shipments with the column time which has the data type timestamp(0) with time zone, i.e. all microseconds are rounded by PostgreSQL to seconds.
I'd like to convert time's data type to allow microseconds, i.e. timestamp with time zone, but the table is large, so I'd like to alter the type:
ALTER TABLE shipments
ALTER COLUMN time
TYPE timestamptz;
...but do not convert data stored in this column, taking into account timestamp(0) and timestamp are perfectly compatible - because in my case data conversion will take a lot of time. How can I accomplish this?
Thanks in advance!