Strange PostgreSQL “value too long for type character varying(500)”

后端 未结 3 811
旧时难觅i
旧时难觅i 2021-01-31 01:27

I have a Postgres schema which looks like:

\"enter

The problem is that whenever I

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 02:02

    Character varying is different than text. Try running

    ALTER TABLE product_product ALTER COLUMN code TYPE text;
    

    That will change the column type to text, which is limited to some very large amount of data (you would probably never actually hit it.)

提交回复
热议问题