PostgreSQL - ERROR: column “date” cannot be cast to type date

后端 未结 1 1340
暗喜
暗喜 2020-12-19 05:01

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

ERROR:

相关标签:
1条回答
  • 2020-12-19 05:15

    You might need to convert it to text first:

    alter table "foo" alter column "date" type date using ("date"::text::date);
    
    0 讨论(0)
提交回复
热议问题