]> granicus.if.org Git - postgresql/commit
Add a nonlocalized version of the severity field to client error messages.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Aug 2016 20:20:17 +0000 (16:20 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Aug 2016 20:20:24 +0000 (16:20 -0400)
commite796d0abab0f9508326c0aa721fe1475548fbe4e
tree924aa2e2655629e8f9f32b602629c8dd8f8b2372
parentbef2d627f30c0d854d02dc860b0d54fa3309d4ee
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: <A88E0006-13CB-49C6-95CC-1A77D717213C@eggerapps.at>
doc/src/sgml/libpq.sgml
doc/src/sgml/protocol.sgml
src/backend/libpq/pqmq.c
src/backend/utils/error/elog.c
src/include/postgres_ext.h
src/interfaces/libpq/fe-exec.c