Re: [GENERAL] INSTEAD rule bug?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] INSTEAD rule bug?
Дата
Msg-id 8961.1058304189@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] INSTEAD rule bug?  (Dmitry Tkach <dmitry@openratings.com>)
Ответы Re: [GENERAL] INSTEAD rule bug?  (Dmitry Tkach <dmitry@openratings.com>)
Список 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 по дате отправления:

Предыдущее
От: Dmitry Tkach
Дата:
Сообщение: Re: [GENERAL] INSTEAD rule bug?
Следующее
От: Dmitry Tkach
Дата:
Сообщение: Re: [GENERAL] INSTEAD rule bug?