mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
A client_encoding specification coming from the connection request has
to be processed by GUC before InitPostgres, because any required lookup of the encoding conversion function has to be done during InitializeClientEncoding. So, I broke this last week by moving GUC processing to after InitPostgres :-(. What we can do as a compromise is process non-SUSET variables during command line scanning (the same as before), and postpone the processing of only SUSET variables. None of the SUSET variables need to be set before InitPostgres.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.249 2004/11/14 19:35:33 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.250 2004/11/24 19:51:03 tgl Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@ -3864,6 +3864,21 @@ GetConfigOptionResetString(const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Detect whether the given configuration option can only be set by
|
||||
* a superuser.
|
||||
*/
|
||||
bool
|
||||
IsSuperuserConfigOption(const char *name)
|
||||
{
|
||||
struct config_generic *record;
|
||||
|
||||
record = find_option(name, ERROR);
|
||||
/* On an unrecognized name, don't error, just return false. */
|
||||
if (record == NULL)
|
||||
return false;
|
||||
return (record->context == PGC_SUSET);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user