sql - alter column from time with time zone to timestamp -
i having trouble changing column called end_date
in table called key_request
time time zone timestamp
in postgres database . have tried using following code:
alter table key_request alter column end_date type timestamp time zone using end_date::timestamp time zone
i keep getting following error:
error: cannot cast type time time zone timestamp time zone
any idea of how can adjust query work?
i woul in series of steps
- alter table, adding new column
end_date1
time time zone
- copy date
end_date
(old)end_date1
- alter table, droping old
end_date
column - alter table,reaming
end_date1
end_date
Comments
Post a Comment