Petr Jelinek <petr@2ndquadrant.com> writes:
> The comment above errhidefromclient says "Only log levels below ERROR
> can be hidden from the client." but use of the errhidefromclient(true)
> actually does hide the error message from client, client just gets
> failed query without any message when used with ERROR level.
Um. That seems pretty broken --- I think it's a violation of the wire
protocol spec.
I notice though that we allow client_min_messages to be set to FATAL,
which would be a different way of violating the protocol. Maybe we
should reduce the max setting of that to ERROR?
libpq/psql seem to more or less survive this situation:
regression=# set client_min_messages to fatal;
SET
regression=# select 2/0;
regression=# select 1;?column?
---------- 1
(1 row)
but it doesn't really seem like a great idea.
regards, tom lane