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

  1. alter table, adding new column end_date1 time time zone
  2. copy date end_date(old) end_date1
  3. alter table, droping old end_date column
  4. alter table,reaming end_date1 end_date

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -