Re: Psql meta-command conninfo+

Поиск
Список
Период
Сортировка
От Jim Jones
Тема Re: Psql meta-command conninfo+
Дата
Msg-id 47dcfd6f-d1d8-4a13-9bc5-b43ee9bd534f@uni-muenster.de
обсуждение исходный текст
Ответ на RE: Psql meta-command conninfo+  (Maiquel Grassi <grassi@hotmail.com.br>)
Ответы RE: Psql meta-command conninfo+  (Maiquel Grassi <grassi@hotmail.com.br>)
Список pgsql-hackers
Hi Maiquel

On 07.02.24 21:13, Maiquel Grassi wrote:
>
> I believe in v7 patch we have a quite substantial meta-command feature.
>
>
Thanks for implementing this. I find it very handy.

I was just wondering if a "permission denied" error for non-superusers
is the best choice for "\conninfo+":

postgres=> \conninfo+
ERROR:  permission denied to examine "unix_socket_directories"
DETAIL:  Only roles with privileges of the "pg_read_all_settings" role
may examine this parameter.

.. since it is not the case with "\conninfo":

postgres=> \conninfo
You are connected to database "postgres" as user "jim" via socket in
"/tmp" at port "5432".

Perhaps excluding the column from the result set or returning NULL in
the affected columns would be less confusing?

There are also some indentation issues in your patch:

/home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:142:
indent with spaces.
    PGresult   *res;
/home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:143:
indent with spaces.
    PQExpBufferData buf;
/home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:144:
indent with spaces.
    printQueryOpt myopt = pset.popt;
/home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:146:
indent with spaces.
    initPQExpBuffer(&buf);
/home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:148:
indent with spaces.
    printfPQExpBuffer(&buf,
warning: squelched 34 whitespace errors
warning: 39 lines add whitespace errors.

Looking forward to see the documentation and tests!

-- 
Jim




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

Предыдущее
От: Mats Kindahl
Дата:
Сообщение: Re: glibc qsort() vulnerability
Следующее
От: Mats Kindahl
Дата:
Сообщение: Re: glibc qsort() vulnerability