Re: BUG #2144: Domain NOT NULL constraints ignored in rules

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "John Supplee" <john(at)supplee(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2144: Domain NOT NULL constraints ignored in rules
Date: 2006-01-04 22:21:07
Message-ID: 8660.1136413267@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"John Supplee" <john(at)supplee(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message mike 2006-01-05 05:01:09 Re: BUG #2145: FTP Mirror to download is not found
Previous Message Brian Hirt 2006-01-04 21:47:09 Re: BUG #2142: autovacuum process (PID 1641) was terminated by signal 11