Re: Implementing standard SQL's DOMAIN constraint

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Implementing standard SQL's DOMAIN constraint
Дата
Msg-id alpine.LNX.2.20.1901020956260.20959@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Implementing standard SQL's DOMAIN constraint  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Implementing standard SQL's DOMAIN constraint  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
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





В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Implementing standard SQL's DOMAIN constraint
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Implementing standard SQL's DOMAIN constraint