Re: DO ... RETURNING

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Merlin Moncure <mmoncure(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" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DO ... RETURNING
Date: 2013-06-11 16:54:31
Message-ID: CAOuzzgp5Bw6ZWdFwTWH-va=TzbVaEL8391DtiWr57zS5r-Ym4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tuesday, June 11, 2013, Pavel Stehule wrote:
>
> > I don't believe there's any intent to ever have DO used for stored
> > procedures. Not only are stored procedures deserving of their own
> > top-level command (eg: CALL, as has been discussed before..), but I
> > believe they would necessairly have different enough semantics that
> > shoe-horning them into DO would end up breaking backwards compatibility.
>
> In this moment, DO doesn't support any feature that is in conflict
> with stored procedure functionality, because it is based on functions,
> and then it have to have limited functionality
>

Let me re-state: I don't see DO, which is entirely function oriented today,
ever being redefined as suddenly being stored procedures instead. Claiming
that it wouldn't impact existing users of DO is a level of hand-waving that
I just can't follow. If nothing else, it would certainly impact external
language support.

If we're going to continue to hand-wave at this then I would argue that
we'd be able to magically make DO .. RETURNING also happily work in "stored
procedure" mode when the time comes without impacting users.

I'm done with this thread. For my part- we can and should extend DO to
support RETURNING. DO RETURNING support is a big enough and useful enough
addition that it can go in by itself. Attempting to feature-creep it to
also cover stored procedures will simply end up killing it unfairly and
will not move us forward at all.

We should also have stored procedures. Until there's an actual patch for
stored procedures which has some real conflict with DO RETURNING, I don't
see it as being relevant.

I look forward to patches for both.

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2013-06-11 16:58:37 Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Previous Message Merlin Moncure 2013-06-11 16:36:51 Re: DO ... RETURNING