Re: show() function
От | Tom Lane |
---|---|
Тема | Re: show() function |
Дата | |
Msg-id | 22660.1025152280@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: show() function (Joe Conway <mail@joeconway.com>) |
Список | 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 по дате отправления: