Re: DO ... RETURNING

From: Stefan Drees <stefan(at)drees(dot)name>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DO ... RETURNING
Date: 2013-06-11 17:39:48
Message-ID: 51B760E4.1080406@drees.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2013-06-11 17:45:15 Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Previous Message Michael Paquier 2013-06-11 17:35:27 Re: how to find out whether a view is updatable