Re: minor doc fix - garbage in example of result of unnest

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: minor doc fix - garbage in example of result of unnest
Дата
Msg-id CAKFQuwbD4K1RFCTVw+3B6Ld7AKYZW18m_wQAuTsjwZ2giXexYw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: minor doc fix - garbage in example of result of unnest  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: minor doc fix - garbage in example of result of unnest  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jun 5, 2020 at 8:38 AM Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
On Fri, Jun 05, 2020 at 09:56:54AM -0400, Tom Lane wrote:
>Pavel Stehule <pavel.stehule@gmail.com> writes:
>> diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
>> index 7c06afd3ea..3b810c0eb4 100644
>> --- a/doc/src/sgml/func.sgml
>> +++ b/doc/src/sgml/func.sgml
>> @@ -17821,7 +17821,6 @@ SELECT NULLIF(value, '(none)') ...
>>   1
>>   2
>>  </programlisting>
>> -        (2 rows in result)
>>         </para></entry>
>>        </row>
>
>That's not "garbage", I put it there intentionally.
>

Why is it outside the <programlisting> though? Also, the next unnest
example does not include the number of rows - why the difference?

More generally I think the final unnest listing is probably the best presentation for a set-returning function, and the one under discussion should be consistent with it.  The function reference documentation doesn't seem like a place to introduce strictly psql output variations like /pset footer on|off.  A set-returning function should be displayed in the example output as a structured table like the last unnest example.  I don't think it's necessary for "single column" sets to be an exception.  Since the examples convert null to (none) there isn't even whitespace concerns in the output where you want to display a bottom boundary for clarity.

Related, It seems arbitrary that the case-related full block examples do not have row counts but the aggregate full block examples do.

I don't see where having the row counts in the output adds clarity and it just more text for the reader to mentally filter out.

David J.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: minor doc fix - garbage in example of result of unnest
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: SIGSEGV from START_REPLICATION 0/XXXXXXX in XLogSendPhysical ()at walsender.c:2762