Re: DO ... RETURNING

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DO ... RETURNING
Date: 2013-06-11 15:27:50
Message-ID: CAHyXU0wPBdHY+JNwuOgWxMeLDqK5AvS1k5Jzp654W1=o_SHwuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 11, 2013 at 9:45 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> * Merlin Moncure (mmoncure(at)gmail(dot)com) 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. This comes up in other feature
requests too, like psql bash-like scripting features.

That said, it would be pretty cool if you could inline DO into a CTE
or more generally into a query (is that possible?) -- then you'd have
something distinct.

merlin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jon Nelson 2013-06-11 15:28:11 Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Previous Message Pavel Stehule 2013-06-11 15:03:02 Re: DO ... RETURNING