Re: Adding comments to help understand psql hidden queries

Поиск
Список
Период
Сортировка
От David Christensen
Тема Re: Adding comments to help understand psql hidden queries
Дата
Msg-id CAHM0NXjO-Thdj+DqT5SOfLGVP-aVKhguiRfmkLDu4BJ_H-gg0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Adding comments to help understand psql hidden queries  (Greg Sabino Mullane <htamfids@gmail.com>)
Ответы Re: Adding comments to help understand psql hidden queries
Список pgsql-hackers
On Fri, Mar 22, 2024 at 9:47 AM Greg Sabino Mullane <htamfids@gmail.com> wrote:
>
> On Thu, Mar 21, 2024 at 6:20 PM Peter Eisentraut <peter@eisentraut.org> wrote:
>>
>> lines are supposed to align vertically.  With your patch, the first line
>> would have variable length depending on the command.
>
>
> Yes, that is a good point. Aligning those would be quite tricky, what if we just kept a standard width for the
closingquery? Probably the 24 stars we currently have to match "QUERY", which it appears nobody has changed for
translationpurposes yet anyway. (If I am reading the code correctly, it would be up to the translators to maintain the
verticalalignment). 

I think it's easier to keep the widths balanced than constant (patch
version included here), but if we needed to squeeze the opening string
to a standard width that would be possible without too much trouble.
The internal comment strings seem to be a bit more of a pain if we
wanted all of the comments to be the same width, as we'd need a table
or something so we can compute the longest string width, etc; doesn't
seem worth the convolutions IMHO.

No changes to Greg's patch, just keeping 'em both so cfbot stays happy.

David

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] plpython function causes server panic