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 1gZ09K-00063i-El for pgsql-general@arkaria.postgresql.org; Mon, 17 Dec 2018 21:10:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZ09I-0001cU-Eo for pgsql-general@arkaria.postgresql.org; Mon, 17 Dec 2018 21:10:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZ09H-0001Xr-R7 for pgsql-general@lists.postgresql.org; Mon, 17 Dec 2018 21:09:59 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZ09A-0007Ni-US for pgsql-general@lists.postgresql.org; Mon, 17 Dec 2018 21:09:58 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 74A6899346 for ; Mon, 17 Dec 2018 13:09:51 -0800 (PST) Date: Mon, 17 Dec 2018 13:09:51 -0800 (PST) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Alter table column constraint [RESOLVED] 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; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 17 Dec 2018, Ron wrote: > Melvin is saying to: > 1. create a table named valid_industry, > 2. populate it with the valid industries, > 3. create an FK constraint on your main table's industry column to > valid_industry.industry, and then > 4. drop the constraint invalid_industry. Got it. Hadn't before considered making column check constraints into separate tables, but now I see the value of doing this. Thanks, all, Rich