Re: PL/pgSQL PERFORM with CTE - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: PL/pgSQL PERFORM with CTE
Date
Msg-id CAHyXU0zVFP+ZDxg3nYbVEvRLVpf15ZzuqDW86cBzwX82gtzLVA@mail.gmail.com
Whole thread Raw
In response to Re: PL/pgSQL PERFORM with CTE  (Josh Berkus <josh@agliodbs.com>)
Responses Re: PL/pgSQL PERFORM with CTE  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On Fri, Aug 23, 2013 at 12:51 PM, Josh Berkus <josh@agliodbs.com> wrote:
> Pavel,
>
>> But it can have a different reason. In T-SQL (Microsoft or Sybase) or MySQL
>> a unbound query is used to direct transfer data to client side.
>
> Are you planning to implement that in PL/pgSQL?
>
> Currently, PL/pgSQL requires RETURN ____ in order to return a query
> result to the caller.  Is there some reason we'd change that?
>
> If you're implementing TSQL-for-PostgreSQL, of course you might want to
> have different behavior with SELECT.  However, TSQL is not PL/pgSQL.

I don't think Pavel's point makes sense in the context of functions.
With stored procedures it might though -- but I don't see why that we
need to reserve behavior for SELECT without INTO -- it can behave
differently when executed with a hypothetical CALL.

merlin



pgsql-hackers by date:

Previous
From: Fábio Telles Rodriguez
Date:
Subject: Re: Performance problem in PLPgSQL
Next
From: Josh Berkus
Date:
Subject: Re: Behaviour of take over the synchronous replication