mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +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:
@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.128 2002/05/05 00:03:28 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.129 2002/05/17 01:19:16 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -249,7 +249,7 @@ BootstrapMain(int argc, char *argv[])
|
||||
dbName = NULL;
|
||||
if (!IsUnderPostmaster)
|
||||
{
|
||||
ResetAllOptions(true);
|
||||
InitializeGUCOptions();
|
||||
potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA
|
||||
* variable */
|
||||
}
|
||||
@ -263,12 +263,13 @@ BootstrapMain(int argc, char *argv[])
|
||||
break;
|
||||
case 'd':
|
||||
{
|
||||
/* Turn on debugging for the postmaster. */
|
||||
/* Turn on debugging for the bootstrap process. */
|
||||
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_ARGV);
|
||||
SetConfigOption("client_min_messages", debugstr, PGC_POSTMASTER, PGC_S_ARGV);
|
||||
SetConfigOption("server_min_messages", debugstr,
|
||||
PGC_POSTMASTER, PGC_S_ARGV);
|
||||
SetConfigOption("client_min_messages", debugstr,
|
||||
PGC_POSTMASTER, PGC_S_ARGV);
|
||||
pfree(debugstr);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user