PostgreSQL - ERROR: date column cannot be selected to enter date

I want to highlight a specific column in my PostgreSQL database from type character_varying to enter a date. phpPgAdmin gives me the following error:

ERROR: column "date" cannot be selected for entering date

In a statement: ALTER TABLE "public". "tablename" ALTER COLUMN "date" TYPE date

What should I do? Thanks

+4
source share
1 answer

You may need to convert it to text first:

alter table "foo" alter column "date" type date using ("date"::text::date); 
+17
source

All Articles