RETURNING and DO INSTEAD ... Intentional or not? - Mailing list pgsql-hackers

From Josh Berkus
Subject RETURNING and DO INSTEAD ... Intentional or not?
Date
Msg-id 200709120944.26875.josh@agliodbs.com
Whole thread Raw
Responses Re: RETURNING and DO INSTEAD ... Intentional or not?
Re: RETURNING and DO INSTEAD ... Intentional or not?
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: A small mistake in the initial latestCompletedXid idea
Next
From: "Florian G. Pflug"
Date:
Subject: Re: A small mistake in the initial latestCompletedXid idea