Re: [GENERAL] INSTEAD rule bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dmitry Tkach <dmitry(at)openratings(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] INSTEAD rule bug?
Date: 2003-07-15 21:23:09
Message-ID: 8961.1058304189@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Dmitry Tkach <dmitry(at)openratings(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dmitry Tkach 2003-07-15 21:28:54 Re: [GENERAL] INSTEAD rule bug?
Previous Message Dmitry Tkach 2003-07-15 21:15:57 Re: [GENERAL] INSTEAD rule bug?

Browse pgsql-general by date

  From Date Subject
Next Message Dmitry Tkach 2003-07-15 21:28:54 Re: [GENERAL] INSTEAD rule bug?
Previous Message Alvaro Herrera 2003-07-15 21:18:03 Re: Firebird vrs Postgresql