Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gYzNA-00020e-17 for pgsql-general@arkaria.postgresql.org; Mon, 17 Dec 2018 20:20:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gYzN8-0006wa-F3 for pgsql-general@arkaria.postgresql.org; Mon, 17 Dec 2018 20:20:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gYzN8-0006v5-5U for pgsql-general@lists.postgresql.org; Mon, 17 Dec 2018 20:20:14 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gYzN6-0006lW-8S for pgsql-general@postgresql.org; Mon, 17 Dec 2018 20:20:13 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id D803A99346 for ; Mon, 17 Dec 2018 12:20:09 -0800 (PST) Date: Mon, 17 Dec 2018 12:20:09 -0800 (PST) From: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: Alter table column constraint In-Reply-To: Message-ID: References: <0d4474ae-9cd8-ee3b-0f95-e5f37f4daaa2@commandprompt.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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