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 1gelFs-0003OW-35 for pgsql-general@arkaria.postgresql.org; Wed, 02 Jan 2019 18:28:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gelFq-0004dW-Pp for pgsql-general@arkaria.postgresql.org; Wed, 02 Jan 2019 18:28:34 +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 1gelFq-0004dP-Hs for pgsql-general@lists.postgresql.org; Wed, 02 Jan 2019 18:28:34 +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 1gelFo-0002Zc-8A for pgsql-general@lists.postgresql.org; Wed, 02 Jan 2019 18:28:34 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id EAF0E9934C for ; Wed, 2 Jan 2019 10:28:29 -0800 (PST) Date: Wed, 2 Jan 2019 10:28:29 -0800 (PST) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Implementing standard SQL's DOMAIN constraint [RESOLVED] In-Reply-To: <284b6b1d-3a8f-f0a6-8446-eaf48174a565@gmail.com> Message-ID: References: <284b6b1d-3a8f-f0a6-8446-eaf48174a565@gmail.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 2 Jan 2019, Ron wrote: > Note that a CHECK constraint with 50 items is a *Very Bad Idea*, since > changing such a constraint is very painful. Use a FK constraint instead. Ron, It's even longer with Canadian provinces included. I gratefully accept your advice and will use a table and foreign key instead. Regards, Rich