Re: BUG #2144: Domain NOT NULL constraints ignored in rules - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2144: Domain NOT NULL constraints ignored in rules
Date
Msg-id 8660.1136413267@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2144: Domain NOT NULL constraints ignored in rules  ("John Supplee" <john@supplee.com>)
Responses Re: BUG #2144: Domain NOT NULL constraints ignored in rules
List pgsql-bugs
"John Supplee" <john@supplee.com> writes:
> Description:        Domain NOT NULL constraints ignored in rules

Works for me:

regression=# create domain dint as int not null;
CREATE DOMAIN
regression=# create table t1 (f1 dint);
CREATE TABLE
regression=# create view v1 as select * from t1;
CREATE VIEW
regression=# create rule r1 as on insert to v1 do instead
regression-# insert into t1 values(new.f1);
CREATE RULE
regression=# insert into v1 values(1);
INSERT 0 1
regression=# insert into v1 values(null);
ERROR:  domain dint does not allow null values
regression=#

How about a test case?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Brian Hirt
Date:
Subject: Re: BUG #2142: autovacuum process (PID 1641) was terminated by signal 11
Next
From: mike
Date:
Subject: Re: BUG #2145: FTP Mirror to download is not found