From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gavin Flower <GavinFlower@archidevsys.co.nz>
Cc: Gavin Flower <gavin.flower@archidevsys.co.nz>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5968: DOCUMENTATION: SELECT synopsis omits RETURNING keyword
Date: Fri, 08 Apr 2011 10:42:49 -0400
Message-ID: <11485.1302273769@sss.pgh.pa.us> (raw)
In-Reply-To: <4D9ED595.3030108@archidevsys.co.nz>
References: <201104072349.p37Nn7GX074930@wwwmaster.postgresql.org>
<18884.1302231444@sss.pgh.pa.us>
<4D9ED3C1.6030103@archidevsys.co.nz>
<4D9ED595.3030108@archidevsys.co.nz>
Gavin Flower <GavinFlower@archidevsys.co.nz> writes:
> I found were RETURNING is defined, so I was confused...
> ...
> However, may be it would still be good to mention it on the SELECT page?
It is mentioned --- the subsection on the WITH clause points out that
you typically want to use RETURNING on an INSERT/UPDATE/DELETE in WITH.
I thought about providing an example, but couldn't come up with one that
was both simple and compelling. There's no strong reason to do WITH
(something RETURNING) SELECT ... --- you might as well just do the work
in a straight "something RETURNING" statement. To do something that
actually requires the more complex syntax, you'd need to join the
RETURNING result to another table or another RETURNING result.
Creating an easily understandable example that involves that is beyond
my powers at this time of the morning.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, GavinFlower@archidevsys.co.nz, gavin.flower@archidevsys.co.nz
Subject: Re: BUG #5968: DOCUMENTATION: SELECT synopsis omits RETURNING keyword
In-Reply-To: <11485.1302273769@sss.pgh.pa.us>
References: <201104072349.p37Nn7GX074930@wwwmaster.postgresql.org> <18884.1302231444@sss.pgh.pa.us> <4D9ED3C1.6030103@archidevsys.co.nz> <4D9ED595.3030108@archidevsys.co.nz> <11485.1302273769@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox