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 <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] 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(-)
