Re: show() function - Mailing list pgsql-patches

From Tom Lane
Subject Re: show() function
Date
Msg-id 22660.1025152280@sss.pgh.pa.us
Whole thread Raw
In response to Re: show() function  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
Joe Conway <mail@joeconway.com> writes:
> Peter Eisentraut wrote:
>> Why?  I thought the SRF can have arbitrary termination actions, so we do
>> you need to count them in advance?

> Well, call it convenience, but num_guc_variables is used throughout
> guc.c, so it seemed consistent and reliable to use as a termination action.

Just standing on the sidelines here, but the above looks like a failure
to communicate.  I think Peter was asking a generic question: why should
the SRF support API include a count field?  And Joe read it as something
very specific: whether the show_all_guc_variables function should employ
a count to decide when it's done.

My take is that the proposed SRF API includes a count field that the
function may use *if it wants to* to store a termination condition.
If not, fine: detect termination however you want.  But the availability
of the field simplifies one common coding pattern, without creating any
noticeable overhead for functions that want to do it differently.

If that wasn't what either of you meant, I'll skulk away quietly...

            regards, tom lane



pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: show() function
Next
From: Joe Conway
Date:
Subject: Re: show() function