Re: PostgreSQL domains and NOT NULL constraint

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: PostgreSQL domains and NOT NULL constraint
Дата
Msg-id 126de91a-7fa8-4552-a5a6-25d51712448b@postgresfriends.org
обсуждение исходный текст
Ответ на Re: PostgreSQL domains and NOT NULL constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 10/13/23 06:37, Tom Lane wrote:
> If it's not nominally of a domain type, please cite chapter and
> verse that says it isn't.

Okay, I found it.


SQL:2023-2 6.7 <column reference>

Syntax Rules

5) Let C be the column that is referenced by CR. The declared type of CR is
    Case:
    a) If the column descriptor of C includes a data type, then that 
data type.

    b) Otherwise, the data type identified in the domain descriptor that 
describes the domain that is identified by the <domain name> that is 
included in the column descriptor of C.


So the domain should not be carried into a query expression (including 
views) and the data type should be the one specified in the domain.
-- 
Vik Fearing




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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2
Следующее
От: Andrew Atkinson
Дата:
Сообщение: Re: [Doc] Glossary Term Definitions Edits