Re: Alter table column constraint

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Alter table column constraint
Date: 2018-12-17 20:20:09
Message-ID: alpine.LNX.2.20.1812171217570.741@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kumar, Virendra 2018-12-17 20:20:12 RE: NL Join vs Merge Join - 5 hours vs 2 seconds
Previous Message Melvin Davidson 2018-12-17 20:13:57 Re: Alter table column constraint