Re: dynamic result sets support in extended query protocol - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: dynamic result sets support in extended query protocol
Date
Msg-id CALNJ-vTHehDOEUTD6iBxaLhQAYvLDOrTRn0vVW+wVscy-VtUiQ@mail.gmail.com
Whole thread Raw
In response to Re: dynamic result sets support in extended query protocol  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: dynamic result sets support in extended query protocol  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers


On Mon, Aug 30, 2021 at 1:23 PM Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
rebased patch set

On 22.07.21 08:06, vignesh C wrote:
> On Tue, Jun 29, 2021 at 7:10 PM Peter Eisentraut
> <peter.eisentraut@enterprisedb.com> wrote:
>>
>> Here is an updated patch with some merge conflicts resolved, to keep it
>> fresh.  It's still pending in the commit fest from last time.
>>
>> My focus right now is to work on the "psql - add SHOW_ALL_RESULTS
>> option" patch (https://commitfest.postgresql.org/33/2096/) first, which
>> is pretty much a prerequisite to this one.  The attached patch set
>> contains a minimal variant of that patch in 0001 and 0002, just to get
>> this working, but disregard those for the purposes of code review.
>>
>> The 0003 patch contains comprehensive documentation and test changes
>> that can explain the feature in its current form.
>
> One of the patch v3-0003-Dynamic-result-sets-from-procedures.patch
> does not apply on HEAD, please post an updated patch for it:
> Hunk #1 FAILED at 57.
> 1 out of 1 hunk FAILED -- saving rejects to file
> src/include/commands/defrem.h.rej
>
> Regards,
> Vignesh
>
>

Hi,

+    <term><literal>WITH RETURN</literal></term>
+    <term><literal>WITHOUT RETURN</literal></term>
+    <listitem>
+     <para>
+      This option is only valid for cursors defined inside a procedure.

Since there are two options listed, I think using 'These options are' would be better. 

For CurrentProcedure(),

+       return InvalidOid;
+   else
+       return llast_oid(procedure_stack);

The word 'else' can be omitted.

Cheers

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: archive status ".ready" files may be created too early
Next
From: Zhihong Yu
Date:
Subject: Re: Use extended statistics to estimate (Var op Var) clauses