Thread: Missing INFO on client_min_messages
If I try to set client_min_messages with a wrong value it raises an error and its hint is
"Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error."
Why is not INFO option on this hint ?
Marcos
On Sunday, November 24, 2024, Marcos Pegoraro <marcos@f10.com.br> wrote:
If I try to set client_min_messages with a wrong value it raises an error and its hint is"Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error."Why is not INFO option on this hint ?
The definition of info is:
Provides information implicitly requested by the user
Requested information by the client should not be allowed to be suppressed by the client.
David J.
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Sunday, November 24, 2024, Marcos Pegoraro <marcos@f10.com.br> wrote: >> If I try to set client_min_messages with a wrong value it raises an error >> and its hint is >> "Available values: debug5, debug4, debug3, debug2, debug1, log, notice, >> warning, error." >> Why is not INFO option on this hint ? > The definition of info is: > Provides information implicitly requested by the user > Requested information by the client should not be allowed to be suppressed > by the client. Yeah. You can set it to INFO if you like, but the behavior is not different from setting it to NOTICE. So apparently we decided long ago that showing INFO as a possible option was more confusing than not showing it. regards, tom lane
Em dom., 24 de nov. de 2024 às 13:57, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Yeah. You can set it to INFO if you like, but the behavior is not
different from setting it to NOTICE.
No, I don't think they have the same behavior.
If you set client_min_messages to Error then notice will not be sent, info will will be sent anyway
postgres=# set client_min_messages = Notice;
SETpostgres=# do $$begin raise INFO 'Sending to client INFO';end;$$;
INFO: Sending to client INFO
DO
postgres=# do $$begin raise NOTICE 'Sending to client NOTICE';end;$$;
NOTICE: Sending to client Notice
DO
postgres=# set client_min_messages = error;
SET
postgres=# do $$begin raise INFO 'Sending to client INFO';end;$$;
INFO: Sending to client INFO
DO
postgres=# do $$begin raise NOTICE 'Sending to client NOTICE';end;$$;
DO
regards
Marcos