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_9whzu0jjgbtdgzkqztot9kho...@mail.gmail.com