RETURNING and DO INSTEAD ... Intentional or not?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема RETURNING and DO INSTEAD ... Intentional or not?
Дата
Msg-id 200709120944.26875.josh@agliodbs.com
обсуждение исходный текст
Ответы Re: RETURNING and DO INSTEAD ... Intentional or not?  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: RETURNING and DO INSTEAD ... Intentional or not?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
All,

A Hibernate developer pointed out the following odd behavior to me in 8.2.1:

create table test ( test1 text );
create table test2 ( test_col text );
create rule test_insert as on insert to test do instead insert into test2 
values ( NEW.test1 ) RETURNING test2.test_col;

postgres=# insert into test values ( 'joe' );
INSERT 0 1

... no RETURNING.  In fact, there doesn't seem to be any way to capture the 
RETURNING output if you have a DO INSTEAD rule on an insert.  Is this 
intentional, or a bug?

-- 
Josh Berkus
PostgreSQL @ Sun
San Francisco


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: A small mistake in the initial latestCompletedXid idea
Следующее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: A small mistake in the initial latestCompletedXid idea