Removing CONTEXT from RAISE EXCEPTION messages from triggers

Started by Peter Geogheganalmost 16 years ago4 messagesgeneral
Jump to latest

Hello,

Is it possible to avoid seeing a CONTEXT notice from error messages
returned by the server due to a RAISE EXCEPTION within a trigger?

--
Regards,
Peter Geoghegan

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Peter Geoghegan (#1)
Re: Removing CONTEXT from RAISE EXCEPTION messages from triggers

Hello

2010/6/3 Peter Geoghegan <peter.geoghegan86@gmail.com>:

Hello,

Is it possible to avoid seeing a CONTEXT notice from error messages
returned by the server due to a RAISE EXCEPTION within a trigger?

yes

\set VERBOSITY terse

regards
Pavel Stehule

Show quoted text

--
Regards,
Peter Geoghegan

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

In reply to: Pavel Stehule (#2)
Re: Removing CONTEXT from RAISE EXCEPTION messages from triggers

\set VERBOSITY terse

Well, I actually didn't mean through psql, but I see I can set
verbosity though a call to PQsetErrorVerbosity().

Maybe this would work better as a GUC that can be set per session?
That way, we wouldn't have to worry about downstream driver authors
supporting it.

--
Regards,
Peter Geoghegan

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Peter Geoghegan (#3)
Re: Removing CONTEXT from RAISE EXCEPTION messages from triggers

Excerpts from Peter Geoghegan's message of jue jun 03 16:23:07 -0400 2010:

\set VERBOSITY terse

Well, I actually didn't mean through psql, but I see I can set
verbosity though a call to PQsetErrorVerbosity().

Maybe this would work better as a GUC that can be set per session?
That way, we wouldn't have to worry about downstream driver authors
supporting it.

This is a client setting, not a server setting, so a GUC doesn't make
much sense. The server always sends everything. It's up to the client
to filter according to the user's preferences.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support