Improve the recently-added support for properly pluralized error messages
commitd24f765e7a19720db41f7cea54f341cf8a2bda56
authortgl <tgl>
Thu, 4 Jun 2009 18:33:08 +0000 (4 18:33 +0000)
committertgl <tgl>
Thu, 4 Jun 2009 18:33:08 +0000 (4 18:33 +0000)
treeac175cc162ba2d4de9e8c12727f7cea2b9207f36
parent065df99d21fd377a401c2138dac4293b37d800f3
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