DOMAIN constraints bug or feature

Поиск
Список
Период
Сортировка
От Viacheslav N Tararin
Тема DOMAIN constraints bug or feature
Дата
Msg-id 3E4A1BB2.9050804@dekasoft.com.ua
обсуждение исходный текст
Список pgsql-general
Hi.

Have next problem DOMAIN constraints ommited in table definition.

--- TEST FILE ---
create domain ID_DOMAIN      integer      not null;
create table test (
    ID    ID_DOMAIN,
    NOTES text      NOT NULL
);

\d test;

alter table test add constraint test_pk primary key (ID);

--- OUTPUT ---
CREATE DOMAIN
CREATE TABLE
      Table "public.test"
 Column |   Type    | Modifiers
--------+-----------+-----------
 id     | id_domain |
 notes  | text      | not null

psql:test.sql:9: ERROR:  Existing attribute "id" cannot be a PRIMARY KEY
because it is not marked NOT NULL
---

Why NOT NULL modifier for ID_DOMAIN not present in the test table
definition?

Thanks



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