pgsql: Improve error code and messages for some SQL-reachable code path - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Improve error code and messages for some SQL-reachable code path
Date
Msg-id E1x8y3Z-00000000lRi-2vcH@gemulon.postgresql.org
Whole thread
List pgsql-committers
Improve error code and messages for some SQL-reachable code paths

The error code paths adjusted in this commit are reachable via SQL
functions that are documented.  Previously, they generated an internal
error code, causing the messages to not be translated.  They are now
upgraded with a suitable error code.

Note the extra consistency in the three typmod errors, and the tweaks in
acldefault_sql() to show correctly non-printable characters.

Author: Alexander Lakhin <exclusion@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/94ac928b-8370-4db5-ada5-579a9ebc089d@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e8a3ee5b1974e2de40e8cf8dac28f2ef500a2950

Modified Files
--------------
src/backend/catalog/objectaddress.c |  4 +++-
src/backend/commands/tablecmds.c    |  1 +
src/backend/parser/parse_utilcmd.c  |  6 ++++--
src/backend/storage/ipc/shmem.c     |  4 +++-
src/backend/utils/adt/acl.c         | 11 ++++++++++-
src/backend/utils/adt/timestamp.c   | 12 +++++++++---
src/pl/plpgsql/src/pl_gram.y        |  4 +++-
7 files changed, 33 insertions(+), 9 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Update .abi-compliance-history for parallel GIN index build fix
Next
From: Nathan Bossart
Date:
Subject: pgsql: Convert ParallelBitmapHeapState->state to an atomic variable.