Re: DO ... RETURNING - Mailing list pgsql-hackers

From Stefan Drees
Subject Re: DO ... RETURNING
Date
Msg-id 51B760E4.1080406@drees.name
Whole thread Raw
In response to Re: DO ... RETURNING  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
On 2013-06-11 19:01 CEST, Hannu Krosing wrote:
> On 06/11/2013 05:27 PM, Merlin Moncure wrote:
>> On Tue, Jun 11, 2013 at 9:45 AM, Stephen Frost ... wrote:
>>> * Merlin Moncure ... wrote:
>>>> I agree with all your comments pretty much down the line.  Need top
>>>> level CALL that supports parameterization and multiple sets that
>>>> utilizes background worker (we have example spi worker that gives some
>>>> hints about how pl/pgsql could be made to work).  Because it's top
>>>> level (can't even be inlined to CTE), we can access behaviors that are
>>>> not possible in current pl/pgsql, for example setting transaction
>>>> isolation in advance of snapshot and changing database connection
>>>> mid-procedure.
>>> And this still has next-to-nothing to do with the specific proposal that
>>> was put forward.
>>
>> It's a complete feature but completely relevant to the discussion --
>> the behaviors have a lot of overlap and CALL is in the standard
>> whereas the ad hoc feature DO isn't.
> Could you point to the ISO/ANSI SQL CALL definition ?

On the publicly available standards page of ISO:

http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html

searching in it for SQL shows link of "ISO/IEC 9075-1:2008":

http://standards.iso.org/ittf/PubliclyAvailableStandards/c045498_ISO_IEC_9075-1_2008.zip

when you follow and go through:

http://standards.iso.org/ittf/licence.html

i.e. accept the granted license, you may receive a personal single copy 
non-distributable PDF version of

ISO/IEC 9075-1:2008, 3rd Edition, Information technology -- Database 
languages -- SQL -- Part 1: Framework (SQL/Framework), of COmmittee 
JTC1/SC32

There at least in section 5.3.4 you find the pointer, that among others, 
the terms CALL and RETURN are specified in ISO9075-2.

So that "points", but to follow to the end ... ;-)

but at least it is clear from this source, that CALL seems to be a 
statement in SQL to invoke a procedure or whatever name juggling suits.

>> ...

HTH,
Stefan.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: how to find out whether a view is updatable
Next
From: Greg Smith
Date:
Subject: Re: fallocate / posix_fallocate for new WAL file creation (etc...)