From: Gavin Flower <GavinFlower@archidevsys.co.nz>
To: Tom Lane <tgl@sss.pgh.pa.us>
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 21:22:09 +1200
Message-ID: <4D9ED3C1.6030103@archidevsys.co.nz> (raw)
In-Reply-To: <18884.1302231444@sss.pgh.pa.us>
References: <201104072349.p37Nn7GX074930@wwwmaster.postgresql.org>
<18884.1302231444@sss.pgh.pa.us>
On 08/04/11 14:57, Tom Lane wrote:
> "Gavin Flower"<gavin.flower@archidevsys.co.nz> writes:
>> I think the documentation of SELECT should include the keyword 'RETURNING'
>> in its synopsis.
> Huh? There's no SELECT RETURNING.
>
> regards, tom lane
The 'WITH' clause is described in the synopsis for 'SELECT' - and the
'WITH' clause uses the keyword 'RETURNING'.
and/with_query/ is:
/with_query_name/ [ (/column_name/ [, ...] ) ] AS (/select/ |/insert/ |/update/ |/delete/ )
So as the 'WITH' clause is defined in the synopsis, I would expect that
the synopsis for 'SELECT' should also mention the 'RETURNING' keyword -
but it does not.
There is an example in:
'7.8. WITH Queries (Common Table Expressions)'
WITH t AS (
UPDATE products SET price = price * 1.05
RETURNING *
)
SELECT * FROM t;
Regards,
Gavin
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: GavinFlower@archidevsys.co.nz, tgl@sss.pgh.pa.us, gavin.flower@archidevsys.co.nz
Subject: Re: BUG #5968: DOCUMENTATION: SELECT synopsis omits RETURNING keyword
In-Reply-To: <4D9ED3C1.6030103@archidevsys.co.nz>
References: <201104072349.p37Nn7GX074930@wwwmaster.postgresql.org> <18884.1302231444@sss.pgh.pa.us> <4D9ED3C1.6030103@archidevsys.co.nz>
* 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