pgsql: Change SQLSTATE for event triggers "wrong context" message

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change SQLSTATE for event triggers "wrong context" message
Date: 2015-04-08 18:28:05
Message-ID: E1Yfuhp-0005Qm-FI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Change SQLSTATE for event triggers "wrong context" message

When certain event-trigger-only functions are called when not in the
wrong context, they were reporting the "feature not supported" SQLSTATE,
which is somewhat misleading. Create a new custom error code for such
uses instead.

Not backpatched since it may be seen as an undesirable behavioral
change.

Author: Michael Paquier
Discussion: https://www.postgresql.org/message-id/CAB7nPqQ-5NAkHQHh_NOm7FPep37NCiLKwPoJ2Yxb8TDoGgbYYA@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/73206812cd97436cffd8f331dbb09d38a2728162

Modified Files
--------------
src/backend/commands/event_trigger.c | 6 +++---
src/backend/utils/errcodes.txt | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2015-04-09 02:32:02 pgsql: Remove obsolete FORCE option from REINDEX.
Previous Message Alvaro Herrera 2015-04-08 16:23:04 pgsql: Fix autovacuum launcher shutdown sequence