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' );

... 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

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at


Reply via email to