Re: RETURNING and DO INSTEAD ... Intentional or not?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Huxton <dev(at)archonet(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RETURNING and DO INSTEAD ... Intentional or not?
Date: 2007-09-12 18:51:24
Message-ID: 200709121151.25144.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-09-12 20:30:28 Re: reindexdb hangs
Previous Message Tom Lane 2007-09-12 18:40:46 Re: RETURNING and DO INSTEAD ... Intentional or not?