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

From Pavel Stehule
Subject Re: PL/pgSQL PERFORM with CTE
Date
Msg-id CAFj8pRCLEgYLSmzWdwgBi-QZTxiVU3PMAgYyRcZ6mQ7u9rEemg@mail.gmail.com
Whole thread Raw
In response to Re: PL/pgSQL PERFORM with CTE  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: PL/pgSQL PERFORM with CTE  ("David E. Wheeler" <david@justatheory.com>)
List pgsql-hackers



2013/8/29 David E. Wheeler <david@justatheory.com>
On Aug 29, 2013, at 2:22 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:

> Still I don't think so correct solution is enabling a unbound SELECTs, but correct is a fix a PERFORM and remove a necessity to use a PERFORM for call of VOID functions.

Well, in this thread, I believe you are the only person who feels that way. And this proposal still would not let PERFORM work with CTEs.


I am thinking, so I propose a enough solution for you - when you use CTE for execution of VOID function, then result vill be VOID set, what we can accept as undefined result, and in this case a PERFORM should not be required. If CTE will return some result, then PERFORM should be required and PERFORM must to support CTE in all possible modes - updateable or not updateable queries.

Regards

Pavel
 

Best,

David


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: PL/pgSQL PERFORM with CTE
Next
From: "David E. Wheeler"
Date:
Subject: Re: PL/pgSQL PERFORM with CTE