BUG #5053: domain constraints still leak

From: "Andrew Gierth" <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5053: domain constraints still leak
Date: 2009-09-14 02:03:53
Message-ID: 200909140203.n8E23roO012573@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


The following bug has been logged online:

Bug reference: 5053
Logged by: Andrew Gierth
Email address: andrew(at)tao11(dot)riddles(dot)org(dot)uk
PostgreSQL version: 8.5devel
Operating system: FreeBSD
Description: domain constraints still leak
Details:

Domain NOT NULL constraints (and probably other constraints too) aren't
being enforced in some code paths. e.g.

\pset null '<NULL>'
create domain tstdom as integer not null;
create table test (a tstdom);
insert into test values (null);
ERROR: domain tstdom does not allow null values

all correct up to now, but:

insert into test select (r).* from (select null::test as r) s;
INSERT 0 1

oops.

select * from test;
a
--------
<NULL>
(1 row)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-09-14 02:28:36 Re: BUG #5053: domain constraints still leak
Previous Message Tom Lane 2009-09-13 19:49:17 Re: BUG #5052: lost history

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-09-14 02:05:00 Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v3
Previous Message Robert Haas 2009-09-14 01:49:37 Re: Issues for named/mixed function notation patch