diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-04-07 00:11:01 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-04-07 00:12:02 -0400 |
| commit | 2594cf0e8c04406ffff19b1651c5a406d376657c (patch) | |
| tree | 8ced737d26b54f4499a8029d8cad0ab42fc83ba3 /src/backend/nls.mk | |
| parent | 5d0e462366f4521e37744fdb42fed3c6819a3374 (diff) | |
| download | postgresql-2594cf0e8c04406ffff19b1651c5a406d376657c.tar.gz | |
Revise the API for GUC variable assign hooks.
The previous functions of assign hooks are now split between check hooks
and assign hooks, where the former can fail but the latter shouldn't.
Aside from being conceptually clearer, this approach exposes the
"canonicalized" form of the variable value to guc.c without having to do
an actual assignment. And that lets us fix the problem recently noted by
Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus
log messages about "parameter "wal_buffers" cannot be changed without
restarting the server". There may be some speed advantage too, because
this design lets hook functions avoid re-parsing variable values when
restoring a previous state after a rollback (they can store a pre-parsed
representation of the value instead). This patch also resolves a
longstanding annoyance about custom error messages from variable assign
hooks: they should modify, not appear separately from, guc.c's own message
about "invalid parameter value".
Diffstat (limited to 'src/backend/nls.mk')
| -rw-r--r-- | src/backend/nls.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/nls.mk b/src/backend/nls.mk index eec8a5e2b0..cf09335a01 100644 --- a/src/backend/nls.mk +++ b/src/backend/nls.mk @@ -2,7 +2,10 @@ CATALOG_NAME := postgres AVAIL_LANGUAGES := de es fr ja pt_BR tr GETTEXT_FILES := + gettext-files -GETTEXT_TRIGGERS:= _ errmsg errmsg_plural:1,2 errdetail errdetail_log errdetail_plural:1,2 errhint errcontext write_stderr yyerror parser_yyerror +GETTEXT_TRIGGERS:= _ errmsg errmsg_plural:1,2 errdetail errdetail_log \ + errdetail_plural:1,2 errhint errcontext \ + GUC_check_errmsg GUC_check_errdetail GUC_check_errhint \ + write_stderr yyerror parser_yyerror gettext-files: distprep find $(srcdir)/ $(srcdir)/../port/ -name '*.c' -print >$@ |
