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 1gel1U-0002pG-Fg for pgsql-general@arkaria.postgresql.org; Wed, 02 Jan 2019 18:13:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gel1R-0001un-KV for pgsql-general@arkaria.postgresql.org; Wed, 02 Jan 2019 18:13:41 +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 1gel1R-0001tz-AG for pgsql-general@lists.postgresql.org; Wed, 02 Jan 2019 18:13:41 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gel1O-0002Eo-GI for pgsql-general@lists.postgresql.org; Wed, 02 Jan 2019 18:13:40 +0000 Received: by mail-ot1-x331.google.com with SMTP id a11so27359529otr.10 for ; Wed, 02 Jan 2019 10:13:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=fjbHghx3TWnc/V2RpKtT1gapL/xBf4eKawag8wc0vEA=; b=Nyo1e30htEtKuJ8FvO1SG/kCSKGnWrWAAu7nv2016jMREO5e5ezy+9ojqtixCiXX6c D4EOrBAGYomHoSnWGtu0e3FLKXUIlmrqrCOsrroY/FHNuIBlYcsyHbqOK+m9m9KtL4D+ eFVmy+mx+rHZF4lDZOU6C3J86SZwpr0M5V7Uzw1+j3grveY02GQep4ywK1Jl3RroQExl UYV/PXMEDonnlS5mM3SooOV5ipDlL3BcZ9Q015SmlcDbteLOL7L423ALpjjDHokKtfD2 PdIKEmsYvkF7PRmTEp4VNRYY/YlVaPqO/7Kz92SEPAaDCz27OHacAVA4QTuY/eEPa0aB VsBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=fjbHghx3TWnc/V2RpKtT1gapL/xBf4eKawag8wc0vEA=; b=qGrgwf1++cI0l1Vz7LxtFilVCtt0rD6YODUqtofNz0JhcCNOzwQCx/O4U8cGx/5S4I U0thMPutTHwLHoapa9VrJ609HBOM4sU8xGPU/59lh1Gf1YkKzQTU3MQ3vrzDlE971y3c Rn+OZsRv1xcqRkB2KrUObLPr6cgFWI5tgK1fpxjrTudgXbmH30vB4+I4TdDFzUd3VfV8 9IaXy9DjEn8Gr5TCbiQ6Qr8SejMgLSem/v79fL7NLiabVSBt1d2wMXJx9gj2Utzwiieb jOWWd1Vxb7T0uJifIatznXZSlz9RE01S3cVq3df+8pMAws+2t34nTMUW7cU0GR5YTwtn vujQ== X-Gm-Message-State: AJcUukdAmlhjP+8pw6wK+1Fcp1tschU6cYksCMSfF5rleUX8WqakrYHs giX81ppJ+Svyy387HIHB9gR0HEUd X-Google-Smtp-Source: ALg8bN7g7jh1FbBtrdjk9C99l91Hc0w6CgbRGpzi3Y5byfkweWjH9jvM9L5HyeXcFDo0eC2a8nqiuA== X-Received: by 2002:a9d:dc3:: with SMTP id 61mr30771530ots.345.1546452815985; Wed, 02 Jan 2019 10:13:35 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id h24sm25011918otq.11.2019.01.02.10.13.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 10:13:35 -0800 (PST) Subject: Re: Implementing standard SQL's DOMAIN constraint [RESOLVED] To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <284b6b1d-3a8f-f0a6-8446-eaf48174a565@gmail.com> Date: Wed, 2 Jan 2019 12:13:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------ADADB9ADEFE5BBA98D0F77E8" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------ADADB9ADEFE5BBA98D0F77E8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 1/2/19 12:05 PM, Rich Shepard wrote: > On Wed, 2 Jan 2019, David G. Johnston wrote: > >> You add the create domain command once before any objects that make use of >> it. > > David, > >   This is the answer I sought: postgres supports the create domain command. > I did not see this in your first response. 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. -- Angular momentum makes the world go 'round. --------------ADADB9ADEFE5BBA98D0F77E8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 1/2/19 12:05 PM, Rich Shepard wrote:
On Wed, 2 Jan 2019, David G. Johnston wrote:

You add the create domain command once before any objects that make use of
it.

David,

  This is the answer I sought: postgres supports the create domain command.
I did not see this in your first response.

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.

--
Angular momentum makes the world go 'round.
--------------ADADB9ADEFE5BBA98D0F77E8--