diff options
author | Tom Lane | 2016-08-26 20:20:17 +0000 |
---|---|---|
committer | Tom Lane | 2016-08-26 20:20:17 +0000 |
commit | 26fa446da64716f12ab3a623434c644fcb344b2e (patch) | |
tree | 6c5cec7916d180a68a5e938d9ee5458e6e334227 /src/include/postgres_ext.h | |
parent | 78dcd027e8f7ed213f69da932853dc4b7cb9cb44 (diff) |
Add a nonlocalized version of the severity field to client error messages.
This has been requested a few times, but the use-case for it was never
entirely clear. The reason for adding it now is that transmission of
error reports from parallel workers fails when NLS is active, because
pq_parse_errornotice() wrongly assumes that the existing severity field
is nonlocalized. There are other ways we could have fixed that, but the
other options were basically kluges, whereas this way provides something
that's at least arguably a useful feature along with the bug fix.
Per report from Jakob Egger. Back-patch into 9.6, because otherwise
parallel query is essentially unusable in non-English locales. The
problem exists in 9.5 as well, but we don't want to risk changing
on-the-wire behavior in 9.5 (even though the possibility of new error
fields is specifically called out in the protocol document). It may
be sufficient to leave the issue unfixed in 9.5, given the very limited
usefulness of pq_parse_errornotice in that version.
Discussion: <[email protected]>
Diffstat (limited to 'src/include/postgres_ext.h')
-rw-r--r-- | src/include/postgres_ext.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h index 74c344c7040..ae2f0877988 100644 --- a/src/include/postgres_ext.h +++ b/src/include/postgres_ext.h @@ -49,6 +49,7 @@ typedef PG_INT64_TYPE pg_int64; * applications. */ #define PG_DIAG_SEVERITY 'S' +#define PG_DIAG_SEVERITY_NONLOCALIZED 'V' #define PG_DIAG_SQLSTATE 'C' #define PG_DIAG_MESSAGE_PRIMARY 'M' #define PG_DIAG_MESSAGE_DETAIL 'D' |