Missing INFO on client_min_messages

Started by Marcos Pegoraroabout 1 year ago4 messages
#1Marcos Pegoraro
marcos@f10.com.br

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 ?

regards
Marcos

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Marcos Pegoraro (#1)
Re: Missing INFO on client_min_messages

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.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: David G. Johnston (#2)
Re: Missing INFO on client_min_messages

"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

#4Marcos Pegoraro
marcos@f10.com.br
In reply to: Tom Lane (#3)
Re: Missing INFO on client_min_messages

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;
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;$$;
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