Re: Fix output of zero privileges in psql

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Fix output of zero privileges in psql
Дата
Msg-id CAKFQuwbb=b74nNFGVrXhfo3cHgdssUBLer+hhnXWib=p_+GG2w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fix output of zero privileges in psql  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Fix output of zero privileges in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Nov 13, 2023 at 12:36 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Mon, 2023-11-13 at 11:27 +0100, Erik Wienhold wrote:
> On 2023-11-09 20:19 +0100, Tom Lane wrote:
> > Laurenz Albe <laurenz.albe@cybertec.at> writes:
> > > Thanks for the feedback.  I'll set the patch to "ready for committer" then.
> >
> > So, just to clarify, we're settling on your v4 from [1]?
> >
> > [1] https://www.postgresql.org/message-id/d799f996f422231a99655f1223667d6d887e4c95.camel@cybertec.at
>
> Yes from my side.

+1


+0.5 for the reasons already stated; but I get and accept the argument for NULL.

I will reiterate my preference for writing an explicit IS NULL branch in the case expression instead of relying upon the strict-ness of array_to_string.

+  "CASE\n"
  WHEN %s IS NULL THEN NULL
+  "  WHEN pg_catalog.cardinality(%s) = 0 THEN '%s'\n"
+  "  ELSE pg_catalog.array_to_string(%s, E'\\n')\n"
+  "END AS \"%s\"",

David J.


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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Fix output of zero privileges in psql
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: COPY TO (FREEZE)?