Re: redacting password in SQL statement in server log

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: redacting password in SQL statement in server log
Дата
Msg-id 20220724114449.qqjbwgmpcgn66yhy@jrouhaud
обсуждение исходный текст
Ответ на Re: redacting password in SQL statement in server log  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
Hi,

On Sun, Jul 24, 2022 at 04:33:59AM -0700, Zhihong Yu wrote:
> I am thinking of adding `if not exists` to `CREATE ROLE` statement:
>
> CREATE ROLE trustworthy if not exists;
>
> In my previous example, if the user can issue the above command, there
> would be no SQL statement logged.

It's not because there might not be an error that the password wouldn't end up
in the logs (log_statement, log_min_duration_statement, typo in the
command...).
>
> Do you think it is worth adding `if not exists` clause ?

This has already been discussed and isn't wanted.  You can refer to the last
discussion about that at:
https://www.postgresql.org/message-id/flat/CAOxo6XJy5_fUT4uDo2251Z_9whzu0JJGbtDgZKqZtOT9KhOKiQ@mail.gmail.com



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

Предыдущее
От: Zhihong Yu
Дата:
Сообщение: Re: redacting password in SQL statement in server log
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Custom tuplesorts for extensions