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

From Josh Berkus
Subject Re: RETURNING and DO INSTEAD ... Intentional or not?
Date
Msg-id 200709121151.25144.josh@agliodbs.com
Whole thread Raw
In response to Re: RETURNING and DO INSTEAD ... Intentional or not?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: RETURNING and DO INSTEAD ... Intentional or not?
List pgsql-hackers
Tom,

> Josh, this *is* documented; see the CREATE RULE reference page for full
> details, and there's at least passing references here:
> http://developer.postgresql.org/pgdocs/postgres/rules-update.html#RULES-UPD
>ATE-VIEWS

Yeah, it's just hard to find since it's buried in an offhand example in a 
subsection which is 5 pages long, and the necessity to match up columns and 
data types in order is not clearly explained.  I've submitted what I believe 
are improvements.

I'll note that we currently prevent adding RETURNING to a *conditional* DO 
INSTEAD rule.  This means that if we have a conditional DO INSTEAD rule which 
inserts into a different table than the final unconditional rule, we'll be 
RETURNING wrong or empty values.  Mind you, that's a pretty extreme corner 
case.

-- 
Josh Berkus
PostgreSQL @ Sun
San Francisco


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RETURNING and DO INSTEAD ... Intentional or not?
Next
From: Alvaro Herrera
Date:
Subject: Re: [ADMIN] reindexdb hangs