mirror of
https://github.com/postgres/postgres.git
synced 2025-10-28 11:55:03 +03:00
Merge the last few variable.c configuration variables into the generic
GUC support. It's now possible to set datestyle, timezone, and client_encoding from postgresql.conf and per-database or per-user settings. Also, implement rollback of SET commands that occur in a transaction that later fails. Create a SET LOCAL var = value syntax that sets the variable only for the duration of the current transaction. All per previous discussions in pghackers.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.273 2002/05/05 00:03:28 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.274 2002/05/17 01:19:17 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -404,12 +404,7 @@ PostmasterMain(int argc, char *argv[])
|
||||
/*
|
||||
* Options setup
|
||||
*/
|
||||
ResetAllOptions(true);
|
||||
|
||||
/* PGPORT environment variable, if set, overrides GUC setting */
|
||||
if (getenv("PGPORT"))
|
||||
SetConfigOption("port", getenv("PGPORT"),
|
||||
PGC_POSTMASTER, PGC_S_ARGV/*sortof*/);
|
||||
InitializeGUCOptions();
|
||||
|
||||
potential_DataDir = getenv("PGDATA"); /* default value */
|
||||
|
||||
@@ -443,8 +438,8 @@ PostmasterMain(int argc, char *argv[])
|
||||
/* Turn on debugging for the postmaster. */
|
||||
char *debugstr = palloc(strlen("debug") + strlen(optarg) + 1);
|
||||
sprintf(debugstr, "debug%s", optarg);
|
||||
/* We use PGC_S_SESSION because we will reset in backend */
|
||||
SetConfigOption("server_min_messages", debugstr, PGC_POSTMASTER, PGC_S_SESSION);
|
||||
SetConfigOption("server_min_messages", debugstr,
|
||||
PGC_POSTMASTER, PGC_S_ARGV);
|
||||
pfree(debugstr);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user