Search Postgresql Archives

Re: Alter table column constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 17 Dec 2018, Melvin Davidson wrote:

Yes, you must drop then add the revised constraint. However, from your
statement above, it sounds to me as if you would be better off using A
FOREIGN kEY CONSTRAINT. It makes things a lot simpler.

Melvin,

  I don't follow. Here's the DDL for that column:

industry varchar(24) NOT NULL
    CONSTRAINT invalid_industry
    CHECK (industry in ('Agriculture', 'Business, other', 'Chemicals',
    'Energy', 'Law', 'Manufacturing', 'Mining', 'Municipalities',
    'Ports/Marine Services', 'Transportation')),

and I want to remove Municipalities for the more general Government.

Regards,

Rich




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux