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

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

java - SmsManager sending message more than one -