I need to convert couple of columns in one table in PSQL and I really dont want to drop the table to fix this (thats my last resort). Is there a way to do this, because when I write:
    ALTER TABLE table ALTER TABLE column type TIMESTAMP without time zone using column::TIMESTAMP without time zone; 
it doesnt work, says:
    ERROR:cannot cast type time without time zone to timestamp without time zone.
P.S. If its possible, I would like to avoid dropping columns because I already use indexes of those columns.
If you want the date part to be today:
alter table the_table
alter column the_column type timestamp without time zone 
using current_date + the_column
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With