Re: [GENERAL] INSTEAD rule bug? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [GENERAL] INSTEAD rule bug?
Date
Msg-id 8961.1058304189@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] INSTEAD rule bug?  (Dmitry Tkach <dmitry@openratings.com>)
Responses Re: [GENERAL] INSTEAD rule bug?  (Dmitry Tkach <dmitry@openratings.com>)
List pgsql-bugs
Dmitry Tkach <dmitry@openratings.com> writes:
> Something like
> insert into test
> select null,null union select 1,2 where false
> has the same problem... and it doesn't refer to any relations.

But that's parsed as

insert into test
(select null,null) union (select 1,2 where false)

so I'd expect it to bomb if test has NOT NULL constraints.

> Not just 7.2... I was testing this in 7.3 - it has the same problem

Yeah, the change is post-7.3.

> insert into test select * from (select null,null union select 1,2 where
> false) as dummy
> ... that works fine.

I get
ERROR:  ExecInsert: Fail to add null value in not null attribute x
which is what I'd expect.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Dmitry Tkach
Date:
Subject: Re: [GENERAL] INSTEAD rule bug?
Next
From: Dmitry Tkach
Date:
Subject: Re: [GENERAL] INSTEAD rule bug?