OSDN Git Service

Improve the recently-added support for properly pluralized error messages
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 4 Jun 2009 18:33:08 +0000 (18:33 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 4 Jun 2009 18:33:08 +0000 (18:33 +0000)
commit76d4abf2d974ffa578ddc7ff40984cc05c1d48b1
treec3f8bab555f06d141026d34df4c7402f279f8ab8
parentfd416db406f9efdbbdbd7b63ea4f9ccf47eec8b3
Improve the recently-added support for properly pluralized error messages
by extending the ereport() API to cater for pluralization directly.  This
is better than the original method of calling ngettext outside the elog.c
code because (1) it avoids double translation, which wastes cycles and in
the worst case could give a wrong result; and (2) it avoids having to use
a different coding method in PL code than in the core backend.  The
client-side uses of ngettext are not touched since neither of these concerns
is very pressing in the client environment.  Per my proposal of yesterday.
17 files changed:
doc/src/sgml/nls.sgml
doc/src/sgml/sources.sgml
src/backend/catalog/dependency.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_shdepend.c
src/backend/executor/execQual.c
src/backend/nls.mk
src/backend/parser/parse_func.c
src/backend/postmaster/bgwriter.c
src/backend/utils/error/elog.c
src/include/utils/elog.h
src/pl/plperl/nls.mk
src/pl/plpgsql/src/nls.mk
src/pl/plpgsql/src/pl_exec.c
src/pl/plpython/nls.mk
src/pl/plpython/plpython.c
src/pl/tcl/nls.mk