Re: DO ... RETURNING

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Hannu Krosing <hannu(at)2ndquadrant(dot)com>
Cc: 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:09:53
Message-ID: CAHyXU0yuUpNEvLLTOODmVKZPGk+kizDwxXVHdjqV90hHg3GBTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 11, 2013 at 12:01 PM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:
> Could you point to the ISO/ANSI SQL CALL definition ?

I can't: no one can because the SQL standard is not available online.
But you can look at various proxies, for example here:
http://farrago.sourceforge.net/design/UserDefinedTypesAndRoutines.html
or here:
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0000897.htm

> As I said before, it is doable now using pl/pgsql and dblink / plproxy
> and is trivial in pl/python.
>> That said, it would be pretty cool if you could inline DO into a CTE
>> or more generally into a query (is that possible?)

> Currently not possible, especially because DO does not return
> anything at this moment.

right, well, I meant hypothetically; I was following along with your
thinking and extending inline code blocks to be able to be used in any
place where a function is allowed. Specifically I was wondering if
there are technical limitations that keep them limited to CTE usage
(as is the case with data modifying WITH).

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2013-06-11 17:35:27 Re: how to find out whether a view is updatable
Previous Message Hannu Krosing 2013-06-11 17:01:03 Re: DO ... RETURNING