diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-04-25 19:45:10 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-04-25 19:45:10 +0000 |
commit | 9cbaf7217747d6b5c88ba9b500a37b8372f185c9 (patch) | |
tree | 18569f5cba46f81d9097c9ea21c29f4a0e055936 /src/backend/access/transam/xlog.c | |
parent | a2190c9eb6afc65fddb80667d48024428368a9b6 (diff) | |
download | postgresql-9cbaf7217747d6b5c88ba9b500a37b8372f185c9.tar.gz postgresql-9cbaf7217747d6b5c88ba9b500a37b8372f185c9.zip |
In the continuing saga of FE/BE protocol revisions, add reporting of
initial values and runtime changes in selected parameters. This gets
rid of the need for an initial 'select pg_client_encoding()' query in
libpq, bringing us back to one message transmitted in each direction
for a standard connection startup. To allow server version to be sent
using the same GUC mechanism that handles other parameters, invent the
concept of a never-settable GUC parameter: you can 'show server_version'
but it's not settable by any GUC input source. Create 'lc_collate' and
'lc_ctype' never-settable parameters so that people can find out these
settings without need for pg_controldata. (These side ideas were all
discussed some time ago in pgsql-hackers, but not yet implemented.)
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 4030a11a52e..d1523dc89b0 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.113 2003/04/18 01:03:41 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.114 2003/04/25 19:45:08 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -36,6 +36,7 @@ #include "storage/sinval.h" #include "storage/spin.h" #include "utils/builtins.h" +#include "utils/guc.h" #include "utils/relcache.h" #include "miscadmin.h" @@ -2260,6 +2261,12 @@ ReadControlFile(void) "\twhich is not recognized by setlocale().\n" "\tIt looks like you need to initdb.", ControlFile->lc_ctype); + + /* Make the fixed locale settings visible as GUC variables, too */ + SetConfigOption("lc_collate", ControlFile->lc_collate, + PGC_INTERNAL, PGC_S_OVERRIDE); + SetConfigOption("lc_ctype", ControlFile->lc_ctype, + PGC_INTERNAL, PGC_S_OVERRIDE); } void |