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)
commit3560f51268bfbd410718fb5538fc3726bd2fa8db
tree5d878c97ee8a8368b7db7c0152db59feb3777b5c
parent09fdf4b7da3ed97d099c4c62e88657cd14f50a51
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