DOMAIN constraints bug or feature

From: Viacheslav N Tararin <taras(at)dekasoft(dot)com(dot)ua>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: DOMAIN constraints bug or feature
Date: 2003-02-12 10:02:26
Message-ID: 3E4A1BB2.9050804@dekasoft.com.ua
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message XIE, Rong 2003-02-12 10:41:44 help me!!
Previous Message bruno peracchio 2003-02-12 09:54:11 view w/pgaccess