pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rich Shepard <rshepard@appl-ecosys.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Implementing standard SQL's DOMAIN constraint
Date: Wed, 2 Jan 2019 09:58:41 -0800 (PST)
Message-ID: <alpine.LNX.2.20.1901020956260.20959@salmo.appl-ecosys.com> (raw)
In-Reply-To: <CAKFQuwb30m1-d35As74bFL8eWxg0oGN7YLW1443P-ZbTPG=-Wg@mail.gmail.com>
References: <alpine.LNX.2.20.1901020905410.20959@salmo.appl-ecosys.com>
	<CAKFQuwbdtPmDR52TBX1EENEbYV2w02GzB1K5z_1O-r2ukfo4Kg@mail.gmail.com>
	<alpine.LNX.2.20.1901020943560.20959@salmo.appl-ecosys.com>
	<CAKFQuwb30m1-d35As74bFL8eWxg0oGN7YLW1443P-ZbTPG=-Wg@mail.gmail.com>

On Wed, 2 Jan 2019, David G. Johnston wrote:

>>   I'm not following you. I have two tables each with a column,
>> state_code char(2) NOT NULL.

> That is a char(2) column for which ‘??’ is a valid value.  The fact that it
> is named state_code is immaterial; the domain that you created doesn’t get
> used.  There is no magic linking just by virtue of using the same name.
>
> Change char(2) to state_code if you wish to apply the domain on the column.

David,

   I think I'm now on your page. In the schema I change the column data type
to state_code, then I add the SQL code creating the domain at the top of the
.sql file. Yes?

Thanks,

Rich







view thread (9+ messages)  latest in thread

Message-ID: <alpine.LNX.2.20.1901020956260.20959@salmo.appl-ecosys.com>
Permalink:  ../alpine.LNX.2.20.1901020956260.20959@salmo.appl-ecosys.com/
Also on:    postgresql.org/message-id/alpine.LNX.2.20.1901020956260.20959@salmo.appl-ecosys.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: rshepard@appl-ecosys.com
  Subject: Re: Implementing standard SQL's DOMAIN constraint
  In-Reply-To: <alpine.LNX.2.20.1901020956260.20959@salmo.appl-ecosys.com>
  References: <alpine.LNX.2.20.1901020905410.20959@salmo.appl-ecosys.com> <CAKFQuwbdtPmDR52TBX1EENEbYV2w02GzB1K5z_1O-r2ukfo4Kg@mail.gmail.com> <alpine.LNX.2.20.1901020943560.20959@salmo.appl-ecosys.com> <CAKFQuwb30m1-d35As74bFL8eWxg0oGN7YLW1443P-ZbTPG=-Wg@mail.gmail.com> <alpine.LNX.2.20.1901020956260.20959@salmo.appl-ecosys.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox