diff options
Diffstat (limited to 'src/backend/utils/misc')
-rw-r--r-- | src/backend/utils/misc/guc.c | 436 | ||||
-rw-r--r-- | src/backend/utils/misc/pg_rusage.c | 6 | ||||
-rw-r--r-- | src/backend/utils/misc/ps_status.c | 48 | ||||
-rw-r--r-- | src/backend/utils/misc/superuser.c | 8 |
4 files changed, 242 insertions, 256 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 1ba1ac31d3..3394fd77e3 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut <peter_e@gmx.net>. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.292 2005/10/14 20:53:56 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.293 2005/10/15 02:49:36 momjian Exp $ * *-------------------------------------------------------------------- */ @@ -72,7 +72,7 @@ #define PG_KRB_SRVNAM "" #endif -#define CONFIG_FILENAME "postgresql.conf" +#define CONFIG_FILENAME "postgresql.conf" #define HBA_FILENAME "pg_hba.conf" #define IDENT_FILENAME "pg_ident.conf" @@ -94,9 +94,10 @@ extern DLLIMPORT bool check_function_bodies; extern int CommitDelay; extern int CommitSiblings; extern char *default_tablespace; -extern bool fullPageWrites; +extern bool fullPageWrites; + #ifdef TRACE_SORT -extern bool trace_sort; +extern bool trace_sort; #endif static const char *assign_log_destination(const char *value, @@ -106,9 +107,9 @@ static const char *assign_log_destination(const char *value, static int syslog_facility = LOG_LOCAL0; static const char *assign_syslog_facility(const char *facility, - bool doit, GucSource source); + bool doit, GucSource source); static const char *assign_syslog_ident(const char *ident, - bool doit, GucSource source); + bool doit, GucSource source); #endif static const char *assign_defaultxactisolevel(const char *newval, bool doit, @@ -157,8 +158,8 @@ bool Explain_pretty_print = true; bool log_parser_stats = false; bool log_planner_stats = false; bool log_executor_stats = false; -bool log_statement_stats = false; /* this is sort of all - * three above together */ +bool log_statement_stats = false; /* this is sort of all three + * above together */ bool log_btree_build_stats = false; bool SQL_inheritance = true; @@ -181,9 +182,9 @@ char *HbaFileName; char *IdentFileName; char *external_pid_file; -int tcp_keepalives_idle; -int tcp_keepalives_interval; -int tcp_keepalives_count; +int tcp_keepalives_idle; +int tcp_keepalives_interval; +int tcp_keepalives_count; /* * These variables are all dummies that don't do anything, except in some @@ -217,8 +218,8 @@ static int max_function_args; static int max_index_keys; static int max_identifier_length; static int block_size; -static bool integer_datetimes; -static bool standard_conforming_strings; +static bool integer_datetimes; +static bool standard_conforming_strings; /* should be static, but commands/variable.c needs to get at these */ char *role_string; @@ -501,7 +502,7 @@ static struct config_bool ConfigureNamesBool[] = {"fsync", PGC_SIGHUP, WAL_SETTINGS, gettext_noop("Forces synchronization of updates to disk."), gettext_noop("The server will use the fsync() system call in several places to make " - "sure that updates are physically written to disk. This insures " + "sure that updates are physically written to disk. This insures " "that a database cluster will recover to a consistent state after " "an operating system or hardware crash.") }, @@ -512,7 +513,7 @@ static struct config_bool ConfigureNamesBool[] = {"zero_damaged_pages", PGC_SUSET, DEVELOPER_OPTIONS, gettext_noop("Continues processing past damaged page headers."), gettext_noop("Detection of a damaged page header normally causes PostgreSQL to " - "report an error, aborting the current transaction. Setting " + "report an error, aborting the current transaction. Setting " "zero_damaged_pages to true causes the system to instead report a " "warning, zero out the damaged page, and continue processing. This " "behavior will destroy data, namely all the rows on the damaged page."), @@ -526,7 +527,7 @@ static struct config_bool ConfigureNamesBool[] = gettext_noop("Writes full pages to WAL when first modified after a checkpoint."), gettext_noop("A page write in process during an operating system crash might be " "only partially written to disk. During recovery, the row changes" - "stored in WAL are not enough to recover. This option writes " + "stored in WAL are not enough to recover. This option writes " "pages when first modified after a checkpoint to WAL so full recovery " "is possible.") }, @@ -537,7 +538,7 @@ static struct config_bool ConfigureNamesBool[] = {"silent_mode", PGC_POSTMASTER, LOGGING_WHEN, gettext_noop("Runs the server silently."), gettext_noop("If this parameter is set, the server will automatically run in the " - "background and any controlling terminals are dissociated.") + "background and any controlling terminals are dissociated.") }, &SilentMode, false, NULL, NULL @@ -693,7 +694,7 @@ static struct config_bool ConfigureNamesBool[] = {"stats_command_string", PGC_SUSET, STATS_COLLECTOR, gettext_noop("Collects statistics about executing commands."), gettext_noop("Enables the collection of statistics on the currently " - "executing command of each session, along with the time " + "executing command of each session, along with the time " "at which that command began execution.") }, &pgstat_collect_querystring, @@ -722,7 +723,7 @@ static struct config_bool ConfigureNamesBool[] = NULL }, &autovacuum_start_daemon, - false, NULL, NULL + false, NULL, NULL }, { @@ -779,8 +780,8 @@ static struct config_bool ConfigureNamesBool[] = gettext_noop("Logs the host name in the connection logs."), gettext_noop("By default, connection logs only show the IP address " "of the connecting host. If you want them to show the host name you " - "can turn this on, but depending on your host name resolution " - "setup it might impose a non-negligible performance penalty.") + "can turn this on, but depending on your host name resolution " + "setup it might impose a non-negligible performance penalty.") }, &log_hostname, false, NULL, NULL @@ -806,7 +807,7 @@ static struct config_bool ConfigureNamesBool[] = {"password_encryption", PGC_USERSET, CONN_AUTH_SECURITY, gettext_noop("Encrypt passwords."), gettext_noop("When a password is specified in CREATE USER or " - "ALTER USER without writing either ENCRYPTED or UNENCRYPTED, " + "ALTER USER without writing either ENCRYPTED or UNENCRYPTED, " "this parameter determines whether the password is to be encrypted.") }, &Password_encryption, @@ -816,9 +817,9 @@ static struct config_bool ConfigureNamesBool[] = {"transform_null_equals", PGC_USERSET, COMPAT_OPTIONS_CLIENT, gettext_noop("Treats \"expr=NULL\" as \"expr IS NULL\"."), gettext_noop("When turned on, expressions of the form expr = NULL " - "(or NULL = expr) are treated as expr IS NULL, that is, they " - "return true if expr evaluates to the null value, and false " - "otherwise. The correct behavior of expr = NULL is to always " + "(or NULL = expr) are treated as expr IS NULL, that is, they " + "return true if expr evaluates to the null value, and false " + "otherwise. The correct behavior of expr = NULL is to always " "return null (unknown).") }, &Transform_null_equals, @@ -979,7 +980,7 @@ static struct config_int ConfigureNamesInt[] = {"default_statistics_target", PGC_USERSET, QUERY_TUNING_OTHER, gettext_noop("Sets the default statistics target."), gettext_noop("This applies to table columns that have not had a " - "column-specific target set via ALTER TABLE SET STATISTICS.") + "column-specific target set via ALTER TABLE SET STATISTICS.") }, &default_statistics_target, 10, 1, 1000, NULL, NULL @@ -989,7 +990,7 @@ static struct config_int ConfigureNamesInt[] = gettext_noop("Sets the FROM-list size beyond which subqueries are not " "collapsed."), gettext_noop("The planner will merge subqueries into upper " - "queries if the resulting FROM list would have no more than " + "queries if the resulting FROM list would have no more than " "this many items.") }, &from_collapse_limit, @@ -1000,7 +1001,7 @@ static struct config_int ConfigureNamesInt[] = gettext_noop("Sets the FROM-list size beyond which JOIN constructs are not " "flattened."), gettext_noop("The planner will flatten explicit inner JOIN " - "constructs into lists of FROM items whenever a list of no more " + "constructs into lists of FROM items whenever a list of no more " "than this many items would result.") }, &join_collapse_limit, @@ -1052,12 +1053,12 @@ static struct config_int ConfigureNamesInt[] = * Note: There is some postprocessing done in PostmasterMain() to make * sure the buffers are at least twice the number of backends, so the * constraints here are partially unused. Similarly, the superuser - * reserved number is checked to ensure it is less than the max - * backends number. + * reserved number is checked to ensure it is less than the max backends + * number. * * MaxBackends is limited to INT_MAX/4 because some places compute - * 4*MaxBackends without any overflow check. Likewise we have to - * limit NBuffers to INT_MAX/2. + * 4*MaxBackends without any overflow check. Likewise we have to limit + * NBuffers to INT_MAX/2. */ { {"max_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS, @@ -1121,7 +1122,7 @@ static struct config_int ConfigureNamesInt[] = {"work_mem", PGC_USERSET, RESOURCES_MEM, gettext_noop("Sets the maximum memory to be used for query workspaces."), gettext_noop("This much memory may be used by each internal " - "sort operation and hash table before switching to " + "sort operation and hash table before switching to " "temporary disk files.") }, &work_mem, @@ -1278,7 +1279,7 @@ static struct config_int ConfigureNamesInt[] = {"max_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT, gettext_noop("Sets the maximum number of locks per transaction."), gettext_noop("The shared lock table is sized on the assumption that " - "at most max_locks_per_transaction * max_connections distinct " + "at most max_locks_per_transaction * max_connections distinct " "objects will need to be locked at any one time.") }, &max_locks_per_xact, @@ -1328,7 +1329,7 @@ static struct config_int ConfigureNamesInt[] = gettext_noop("Logs if filling of checkpoint segments happens more " "frequently than this (in seconds)."), gettext_noop("Write a message to the server log if checkpoints " - "caused by the filling of checkpoint segment files happens more " + "caused by the filling of checkpoint segment files happens more " "frequently than this number of seconds. Zero turns off the warning.") }, &CheckPointWarning, @@ -1368,7 +1369,7 @@ static struct config_int ConfigureNamesInt[] = {"extra_float_digits", PGC_USERSET, CLIENT_CONN_LOCALE, gettext_noop("Sets the number of digits displayed for floating-point values."), gettext_noop("This affects real, double precision, and geometric data types. " - "The parameter value is added to the standard number of digits " + "The parameter value is added to the standard number of digits " "(FLT_DIG or DBL_DIG as appropriate).") }, &extra_float_digits, @@ -1497,29 +1498,29 @@ static struct config_int ConfigureNamesInt[] = { {"tcp_keepalives_idle", PGC_USERSET, CLIENT_CONN_OTHER, - gettext_noop("Seconds between issuing TCP keepalives."), - gettext_noop("A value of 0 uses the system default."), - }, + gettext_noop("Seconds between issuing TCP keepalives."), + gettext_noop("A value of 0 uses the system default."), + }, &tcp_keepalives_idle, 0, 0, INT_MAX, assign_tcp_keepalives_idle, show_tcp_keepalives_idle }, { {"tcp_keepalives_interval", PGC_USERSET, CLIENT_CONN_OTHER, - gettext_noop("Seconds between TCP keepalive retransmits."), - gettext_noop("A value of 0 uses the system default."), - }, + gettext_noop("Seconds between TCP keepalive retransmits."), + gettext_noop("A value of 0 uses the system default."), + }, &tcp_keepalives_interval, 0, 0, INT_MAX, assign_tcp_keepalives_interval, show_tcp_keepalives_interval }, { {"tcp_keepalives_count", PGC_USERSET, CLIENT_CONN_OTHER, - gettext_noop("Maximum number of TCP keepalive retransmits."), - gettext_noop("This controls the number of consecutive keepalive retransmits that can be " - "lost before a connection is considered dead. A value of 0 uses the " - "system default."), - }, + gettext_noop("Maximum number of TCP keepalive retransmits."), + gettext_noop("This controls the number of consecutive keepalive retransmits that can be " + "lost before a connection is considered dead. A value of 0 uses the " + "system default."), + }, &tcp_keepalives_count, 0, 0, INT_MAX, assign_tcp_keepalives_count, show_tcp_keepalives_count }, @@ -1548,7 +1549,7 @@ static struct config_real ConfigureNamesReal[] = gettext_noop("Sets the planner's estimate of the cost of a nonsequentially " "fetched disk page."), gettext_noop("This is measured as a multiple of the cost of a " - "sequential page fetch. A higher value makes it more likely a " + "sequential page fetch. A higher value makes it more likely a " "sequential scan will be used, a lower value makes it more likely an " "index scan will be used.") }, @@ -1683,7 +1684,7 @@ static struct config_string ConfigureNamesString[] = {"log_min_messages", PGC_SUSET, LOGGING_WHEN, gettext_noop("Sets the message levels that are logged."), gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, " - "INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level " + "INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level " "includes all the levels that follow it.") }, &log_min_messages_str, @@ -2060,9 +2061,9 @@ static struct config_string ConfigureNamesString[] = { {"data_directory", PGC_POSTMASTER, FILE_LOCATIONS, - gettext_noop("Sets the server's data directory."), - NULL, - GUC_SUPERUSER_ONLY + gettext_noop("Sets the server's data directory."), + NULL, + GUC_SUPERUSER_ONLY }, &data_directory, NULL, NULL, NULL @@ -2070,9 +2071,9 @@ static struct config_string ConfigureNamesString[] = { {"config_file", PGC_POSTMASTER, FILE_LOCATIONS, - gettext_noop("Sets the server's main configuration file."), - NULL, - GUC_DISALLOW_IN_FILE | GUC_SUPERUSER_ONLY + gettext_noop("Sets the server's main configuration file."), + NULL, + GUC_DISALLOW_IN_FILE | GUC_SUPERUSER_ONLY }, &ConfigFileName, NULL, NULL, NULL @@ -2080,9 +2081,9 @@ static struct config_string ConfigureNamesString[] = { {"hba_file", PGC_POSTMASTER, FILE_LOCATIONS, - gettext_noop("Sets the server's \"hba\" configuration file"), - NULL, - GUC_SUPERUSER_ONLY + gettext_noop("Sets the server's \"hba\" configuration file"), + NULL, + GUC_SUPERUSER_ONLY }, &HbaFileName, NULL, NULL, NULL @@ -2090,9 +2091,9 @@ static struct config_string ConfigureNamesString[] = { {"ident_file", PGC_POSTMASTER, FILE_LOCATIONS, - gettext_noop("Sets the server's \"ident\" configuration file"), - NULL, - GUC_SUPERUSER_ONLY + gettext_noop("Sets the server's \"ident\" configuration file"), + NULL, + GUC_SUPERUSER_ONLY }, &IdentFileName, NULL, NULL, NULL @@ -2100,9 +2101,9 @@ static struct config_string ConfigureNamesString[] = { {"external_pid_file", PGC_POSTMASTER, FILE_LOCATIONS, - gettext_noop("Writes the postmaster PID to the specified file."), - NULL, - GUC_SUPERUSER_ONLY + gettext_noop("Writes the postmaster PID to the specified file."), + NULL, + GUC_SUPERUSER_ONLY }, &external_pid_file, NULL, assign_canonical_path, NULL @@ -2341,8 +2342,8 @@ static bool is_custom_class(const char *name, int dotPos) { /* - * assign_custom_variable_classes() has made sure no empty - * identifiers or whitespace exists in the variable + * assign_custom_variable_classes() has made sure no empty identifiers or + * whitespace exists in the variable */ bool result = false; const char *ccs = GetConfigOption("custom_variable_classes"); @@ -2472,21 +2473,21 @@ find_option(const char *name, int elevel) Assert(name); /* - * By equating const char ** with struct config_generic *, we are - * assuming the name field is first in config_generic. + * By equating const char ** with struct config_generic *, we are assuming + * the name field is first in config_generic. */ res = (struct config_generic **) bsearch((void *) &key, (void *) guc_variables, num_guc_variables, - sizeof(struct config_generic *), + sizeof(struct config_generic *), guc_var_compare); if (res) return *res; /* - * See if the name is an obsolete name for a variable. We assume that - * the set of supported old names is short enough that a brute-force - * search is the best way. + * See if the name is an obsolete name for a variable. We assume that the + * set of supported old names is short enough that a brute-force search is + * the best way. */ for (i = 0; map_old_guc_names[i] != NULL; i += 2) { @@ -2495,8 +2496,8 @@ find_option(const char *name, int elevel) } /* - * Check if the name is qualified, and if so, check if the qualifier - * maps to a custom variable class. + * Check if the name is qualified, and if so, check if the qualifier maps + * to a custom variable class. */ dot = strchr(name, GUC_QUALIFIER_SEPARATOR); if (dot != NULL && is_custom_class(name, dot - name)) @@ -2525,9 +2526,9 @@ static int guc_name_compare(const char *namea, const char *nameb) { /* - * The temptation to use strcasecmp() here must be resisted, because - * the array ordering has to remain stable across setlocale() calls. - * So, build our own with a simple ASCII-only downcasing. + * The temptation to use strcasecmp() here must be resisted, because the + * array ordering has to remain stable across setlocale() calls. So, build + * our own with a simple ASCII-only downcasing. */ while (*namea && *nameb) { @@ -2656,8 +2657,7 @@ InitializeGUCOptions(void) free(str); /* - * See notes in set_config_option about - * casting + * See notes in set_config_option about casting */ str = (char *) newstr; conf->reset_val = str; @@ -2683,8 +2683,8 @@ InitializeGUCOptions(void) PGC_POSTMASTER, PGC_S_OVERRIDE); /* - * For historical reasons, some GUC parameters can receive defaults - * from environment variables. Process those settings. + * For historical reasons, some GUC parameters can receive defaults from + * environment variables. Process those settings. */ env = getenv("PGPORT"); @@ -2727,9 +2727,9 @@ SelectConfigFiles(const char *userDoption, const char *progname) /* * Find the configuration file: if config_file was specified on the - * command line, use it, else use configdir/postgresql.conf. In any - * case ensure the result is an absolute path, so that it will be - * interpreted the same way by future backends. + * command line, use it, else use configdir/postgresql.conf. In any case + * ensure the result is an absolute path, so that it will be interpreted + * the same way by future backends. */ if (ConfigFileName) fname = make_absolute_path(ConfigFileName); @@ -2749,8 +2749,8 @@ SelectConfigFiles(const char *userDoption, const char *progname) } /* - * Set the ConfigFileName GUC variable to its final value, ensuring - * that it can't be overridden later. + * Set the ConfigFileName GUC variable to its final value, ensuring that + * it can't be overridden later. */ SetConfigOption("config_file", fname, PGC_POSTMASTER, PGC_S_OVERRIDE); free(fname); @@ -2771,8 +2771,8 @@ SelectConfigFiles(const char *userDoption, const char *progname) * If the data_directory GUC variable has been set, use that as DataDir; * otherwise use configdir if set; else punt. * - * Note: SetDataDir will copy and absolute-ize its argument, - * so we don't have to. + * Note: SetDataDir will copy and absolute-ize its argument, so we don't have + * to. */ if (data_directory) SetDataDir(data_directory); @@ -2792,9 +2792,9 @@ SelectConfigFiles(const char *userDoption, const char *progname) * Reflect the final DataDir value back into the data_directory GUC var. * (If you are wondering why we don't just make them a single variable, * it's because the EXEC_BACKEND case needs DataDir to be transmitted to - * child backends specially. XXX is that still true? Given that we - * now chdir to DataDir, EXEC_BACKEND can read the config file without - * knowing DataDir in advance.) + * child backends specially. XXX is that still true? Given that we now + * chdir to DataDir, EXEC_BACKEND can read the config file without knowing + * DataDir in advance.) */ SetConfigOption("data_directory", DataDir, PGC_POSTMASTER, PGC_S_OVERRIDE); @@ -2954,8 +2954,7 @@ ResetAllOptions(void) else if (newstr != str) { /* - * See notes in set_config_option about - * casting + * See notes in set_config_option about casting */ str = (char *) newstr; } @@ -3005,8 +3004,8 @@ push_old_value(struct config_generic * gconf) /* * We keep all the stack entries in TopTransactionContext so as to - * avoid allocation problems when a subtransaction back-fills - * stack entries for upper transaction levels. + * avoid allocation problems when a subtransaction back-fills stack + * entries for upper transaction levels. */ stack = (GucStack *) MemoryContextAlloc(TopTransactionContext, sizeof(GucStack)); @@ -3098,27 +3097,26 @@ AtEOXact_GUC(bool isCommit, bool isSubXact) Assert(stack->nest_level == my_level); /* - * We will pop the stack entry. Start by restoring outer xact - * status (since we may want to modify it below). Be careful to - * use my_status to reference the inner xact status below this - * point... + * We will pop the stack entry. Start by restoring outer xact status + * (since we may want to modify it below). Be careful to use + * my_status to reference the inner xact status below this point... */ gconf->status = stack->status; /* * We have two cases: * - * If commit and HAVE_TENTATIVE, set actual value to tentative (this - * is to override a SET LOCAL if one occurred later than SET). We - * keep the tentative value and propagate HAVE_TENTATIVE to the - * parent status, allowing the SET's effect to percolate up. (But - * if we're exiting the outermost transaction, we'll drop the - * HAVE_TENTATIVE bit below.) + * If commit and HAVE_TENTATIVE, set actual value to tentative (this is + * to override a SET LOCAL if one occurred later than SET). We keep + * the tentative value and propagate HAVE_TENTATIVE to the parent + * status, allowing the SET's effect to percolate up. (But if we're + * exiting the outermost transaction, we'll drop the HAVE_TENTATIVE + * bit below.) * * Otherwise, we have a transaction that aborted or executed only SET - * LOCAL (or no SET at all). In either case it should have no - * further effect, so restore both tentative and actual values - * from the stack entry. + * LOCAL (or no SET at all). In either case it should have no further + * effect, so restore both tentative and actual values from the stack + * entry. */ useTentative = isCommit && (my_status & GUC_HAVE_TENTATIVE) != 0; @@ -3150,7 +3148,7 @@ AtEOXact_GUC(bool isCommit, bool isSubXact) { if (conf->assign_hook) if (!(*conf->assign_hook) (newval, - true, PGC_S_OVERRIDE)) + true, PGC_S_OVERRIDE)) elog(LOG, "failed to commit %s", conf->gen.name); *conf->variable = newval; @@ -3183,7 +3181,7 @@ AtEOXact_GUC(bool isCommit, bool isSubXact) { if (conf->assign_hook) if (!(*conf->assign_hook) (newval, - true, PGC_S_OVERRIDE)) + true, PGC_S_OVERRIDE)) elog(LOG, "failed to commit %s", conf->gen.name); *conf->variable = newval; @@ -3216,7 +3214,7 @@ AtEOXact_GUC(bool isCommit, bool isSubXact) { if (conf->assign_hook) if (!(*conf->assign_hook) (newval, - true, PGC_S_OVERRIDE)) + true, PGC_S_OVERRIDE)) elog(LOG, "failed to commit %s", conf->gen.name); *conf->variable = newval; @@ -3253,7 +3251,7 @@ AtEOXact_GUC(bool isCommit, bool isSubXact) const char *newstr; newstr = (*conf->assign_hook) (newval, true, - PGC_S_OVERRIDE); + PGC_S_OVERRIDE); if (newstr == NULL) elog(LOG, "failed to commit %s", conf->gen.name); @@ -3263,8 +3261,7 @@ AtEOXact_GUC(bool isCommit, bool isSubXact) * If newval should now be freed, it'll be * taken care of below. * - * See notes in set_config_option about - * casting + * See notes in set_config_option about casting */ newval = (char *) newstr; } @@ -3291,8 +3288,8 @@ AtEOXact_GUC(bool isCommit, bool isSubXact) pfree(stack); /* - * If we're now out of all xact levels, forget TENTATIVE status - * bit; there's nothing tentative about the value anymore. + * If we're now out of all xact levels, forget TENTATIVE status bit; + * there's nothing tentative about the value anymore. */ if (!isSubXact) { @@ -3306,10 +3303,10 @@ AtEOXact_GUC(bool isCommit, bool isSubXact) } /* - * If we're now out of all xact levels, we can clear guc_dirty. (Note: - * we cannot reset guc_dirty when exiting a subtransaction, because we - * know that all outer transaction levels will have stacked values to - * deal with.) + * If we're now out of all xact levels, we can clear guc_dirty. (Note: we + * cannot reset guc_dirty when exiting a subtransaction, because we know + * that all outer transaction levels will have stacked values to deal + * with.) */ if (!isSubXact) guc_dirty = false; @@ -3326,8 +3323,8 @@ BeginReportingGUCOptions(void) int i; /* - * Don't do anything unless talking to an interactive frontend of - * protocol 3.0 or later. + * Don't do anything unless talking to an interactive frontend of protocol + * 3.0 or later. */ if (whereToSendOutput != Remote || PG_PROTOCOL_MAJOR(FrontendProtocol) < 3) @@ -3566,15 +3563,14 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("unrecognized configuration parameter \"%s\"", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); return false; } /* - * Check if the option can be set at this time. See guc.h for the - * precise rules. Note that we don't want to throw errors if we're in - * the SIGHUP context. In that case we just ignore the attempt and - * return true. + * Check if the option can be set at this time. See guc.h for the precise + * rules. Note that we don't want to throw errors if we're in the SIGHUP + * context. In that case we just ignore the attempt and return true. */ switch (record->context) { @@ -3613,22 +3609,22 @@ set_config_option(const char *name, const char *value, } /* - * Hmm, the idea of the SIGHUP context is "ought to be global, - * but can be changed after postmaster start". But there's - * nothing that prevents a crafty administrator from sending - * SIGHUP signals to individual backends only. + * Hmm, the idea of the SIGHUP context is "ought to be global, but + * can be changed after postmaster start". But there's nothing + * that prevents a crafty administrator from sending SIGHUP + * signals to individual backends only. */ break; case PGC_BACKEND: if (context == PGC_SIGHUP) { /* - * If a PGC_BACKEND parameter is changed in the config - * file, we want to accept the new value in the postmaster - * (whence it will propagate to subsequently-started - * backends), but ignore it in existing backends. This is - * a tad klugy, but necessary because we don't re-read the - * config file during backend start. + * If a PGC_BACKEND parameter is changed in the config file, + * we want to accept the new value in the postmaster (whence + * it will propagate to subsequently-started backends), but + * ignore it in existing backends. This is a tad klugy, but + * necessary because we don't re-read the config file during + * backend start. */ if (IsUnderPostmaster) return true; @@ -3647,8 +3643,8 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to set parameter \"%s\"", - name))); + errmsg("permission denied to set parameter \"%s\"", + name))); return false; } break; @@ -3666,10 +3662,9 @@ set_config_option(const char *name, const char *value, /* * Ignore attempted set if overridden by previously processed setting. * However, if changeVal is false then plow ahead anyway since we are - * trying to find out if the value is potentially good, not actually - * use it. Also keep going if makeDefault is true, since we may want - * to set the reset/stacked values even if we can't set the variable - * itself. + * trying to find out if the value is potentially good, not actually use + * it. Also keep going if makeDefault is true, since we may want to set + * the reset/stacked values even if we can't set the variable itself. */ if (record->source > source) { @@ -3698,8 +3693,8 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("parameter \"%s\" requires a Boolean value", - name))); + errmsg("parameter \"%s\" requires a Boolean value", + name))); return false; } } @@ -3714,8 +3709,8 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for parameter \"%s\": %d", - name, (int) newval))); + errmsg("invalid value for parameter \"%s\": %d", + name, (int) newval))); return false; } @@ -3774,8 +3769,8 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("parameter \"%s\" requires an integer value", - name))); + errmsg("parameter \"%s\" requires an integer value", + name))); return false; } if (newval < conf->min || newval > conf->max) @@ -3783,7 +3778,7 @@ set_config_option(const char *name, const char *value, ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("%d is outside the valid range for parameter \"%s\" (%d .. %d)", - newval, name, conf->min, conf->max))); + newval, name, conf->min, conf->max))); return false; } } @@ -3798,8 +3793,8 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for parameter \"%s\": %d", - name, newval))); + errmsg("invalid value for parameter \"%s\": %d", + name, newval))); return false; } @@ -3858,8 +3853,8 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("parameter \"%s\" requires a numeric value", - name))); + errmsg("parameter \"%s\" requires a numeric value", + name))); return false; } if (newval < conf->min || newval > conf->max) @@ -3867,7 +3862,7 @@ set_config_option(const char *name, const char *value, ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("%g is outside the valid range for parameter \"%s\" (%g .. %g)", - newval, name, conf->min, conf->max))); + newval, name, conf->min, conf->max))); return false; } } @@ -3882,8 +3877,8 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for parameter \"%s\": %g", - name, newval))); + errmsg("invalid value for parameter \"%s\": %g", + name, newval))); return false; } @@ -3945,9 +3940,8 @@ set_config_option(const char *name, const char *value, else if (conf->reset_val) { /* - * We could possibly avoid strdup here, but easier to - * make this case work the same as the normal - * assignment case. + * We could possibly avoid strdup here, but easier to make + * this case work the same as the normal assignment case. */ newval = guc_strdup(elevel, conf->reset_val); if (newval == NULL) @@ -3977,8 +3971,8 @@ set_config_option(const char *name, const char *value, free(newval); ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for parameter \"%s\": \"%s\"", - name, value ? value : ""))); + errmsg("invalid value for parameter \"%s\": \"%s\"", + name, value ? value : ""))); return false; } else if (hookresult != newval) @@ -3986,13 +3980,12 @@ set_config_option(const char *name, const char *value, free(newval); /* - * Having to cast away const here is annoying, but - * the alternative is to declare assign_hooks as - * returning char*, which would mean they'd have - * to cast away const, or as both taking and - * returning char*, which doesn't seem attractive - * either --- we don't want them to scribble on - * the passed str. + * Having to cast away const here is annoying, but the + * alternative is to declare assign_hooks as returning + * char*, which would mean they'd have to cast away + * const, or as both taking and returning char*, which + * doesn't seem attractive either --- we don't want + * them to scribble on the passed str. */ newval = (char *) hookresult; } @@ -4087,7 +4080,7 @@ GetConfigOption(const char *name) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("unrecognized configuration parameter \"%s\"", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); if ((record->flags & GUC_SUPERUSER_ONLY) && !superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), @@ -4127,7 +4120,7 @@ GetConfigOptionResetString(const char *name) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("unrecognized configuration parameter \"%s\"", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); if ((record->flags & GUC_SUPERUSER_ONLY) && !superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), @@ -4191,8 +4184,8 @@ flatten_set_variable_args(const char *name, List *args) ListCell *l; /* - * Fast path if just DEFAULT. We do not check the variable name in - * this case --- necessary for RESET ALL to work correctly. + * Fast path if just DEFAULT. We do not check the variable name in this + * case --- necessary for RESET ALL to work correctly. */ if (args == NIL) return NULL; @@ -4202,7 +4195,7 @@ flatten_set_variable_args(const char *name, List *args) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("unrecognized configuration parameter \"%s\"", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); flags = record->flags; @@ -4240,18 +4233,18 @@ flatten_set_variable_args(const char *name, List *args) if (arg->typename != NULL) { /* - * Must be a ConstInterval argument for TIME ZONE. - * Coerce to interval and back to normalize the value - * and account for any typmod. + * Must be a ConstInterval argument for TIME ZONE. Coerce + * to interval and back to normalize the value and account + * for any typmod. */ - Datum interval; + Datum interval; char *intervalout; interval = - DirectFunctionCall3(interval_in, - CStringGetDatum(val), - ObjectIdGetDatum(InvalidOid), - Int32GetDatum(arg->typename->typmod)); + DirectFunctionCall3(interval_in, + CStringGetDatum(val), + ObjectIdGetDatum(InvalidOid), + Int32GetDatum(arg->typename->typmod)); intervalout = DatumGetCString(DirectFunctionCall1(interval_out, @@ -4261,8 +4254,8 @@ flatten_set_variable_args(const char *name, List *args) else { /* - * Plain string literal or identifier. For quote - * mode, quote it if it's not a vanilla identifier. + * Plain string literal or identifier. For quote mode, + * quote it if it's not a vanilla identifier. */ if (flags & GUC_LIST_QUOTE) appendStringInfoString(&buf, quote_identifier(val)); @@ -4325,8 +4318,8 @@ set_config_by_name(PG_FUNCTION_ARGS) value = DatumGetCString(DirectFunctionCall1(textout, PG_GETARG_DATUM(1))); /* - * Get the desired state of is_local. Default to false if provided - * value is NULL + * Get the desired state of is_local. Default to false if provided value + * is NULL */ if (PG_ARGISNULL(2)) is_local = false; @@ -4359,11 +4352,11 @@ define_custom_variable(struct config_generic * variable) const char *value; struct config_string *pHolder; struct config_generic **res = (struct config_generic **) bsearch( - (void *) &nameAddr, - (void *) guc_variables, - num_guc_variables, - sizeof(struct config_generic *), - guc_var_compare); + (void *) &nameAddr, + (void *) guc_variables, + num_guc_variables, + sizeof(struct config_generic *), + guc_var_compare); if (res == NULL) { @@ -4388,8 +4381,7 @@ define_custom_variable(struct config_generic * variable) value = *pHolder->variable; /* - * Assign the string value stored in the placeholder to the real - * variable. + * Assign the string value stored in the placeholder to the real variable. * * XXX this is not really good enough --- it should be a nontransactional * assignment, since we don't want it to roll back if the current xact @@ -4656,7 +4648,7 @@ ShowAllGUCConfig(DestReceiver *dest) TEXTOID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 3, "description", TEXTOID, -1, 0); - + /* prepare for projection of tuples */ tstate = begin_tup_output_tupdesc(dest, tupdesc); @@ -4698,7 +4690,7 @@ GetConfigOptionByName(const char *name, const char **varname) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("unrecognized configuration parameter \"%s\"", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); if ((record->flags & GUC_SUPERUSER_ONLY) && !superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), @@ -4814,8 +4806,7 @@ GetConfigOptionByNum(int varnum, const char **values, bool *noshow) default: { /* - * should never get here, but in case we do, set 'em to - * NULL + * should never get here, but in case we do, set 'em to NULL */ /* min_val */ @@ -4884,14 +4875,13 @@ show_all_settings(PG_FUNCTION_ARGS) funcctx = SRF_FIRSTCALL_INIT(); /* - * switch to memory context appropriate for multiple function - * calls + * switch to memory context appropriate for multiple function calls */ oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); /* - * need a tuple descriptor representing NUM_PG_SETTINGS_ATTS - * columns of the appropriate types + * need a tuple descriptor representing NUM_PG_SETTINGS_ATTS columns + * of the appropriate types */ tupdesc = CreateTemplateTupleDesc(NUM_PG_SETTINGS_ATTS, false); TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name", @@ -4916,8 +4906,8 @@ show_all_settings(PG_FUNCTION_ARGS) TEXTOID, -1, 0); /* - * Generate attribute metadata needed later to produce tuples from - * raw C strings + * Generate attribute metadata needed later to produce tuples from raw + * C strings */ attinmeta = TupleDescGetAttInMetadata(tupdesc); funcctx->attinmeta = attinmeta; @@ -5144,8 +5134,8 @@ write_nondefault_variables(GucContext context) } /* - * Put new file in place. This could delay on Win32, but we don't - * hold any exclusive locks. + * Put new file in place. This could delay on Win32, but we don't hold + * any exclusive locks. */ rename(CONFIG_EXEC_PARAMS_NEW, CONFIG_EXEC_PARAMS); } @@ -5233,8 +5223,7 @@ read_nondefault_variables(void) FreeFile(fp); } - -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ /* @@ -5317,15 +5306,15 @@ ProcessGUCArray(ArrayType *array, GucSource source) { ereport(WARNING, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("could not parse setting for parameter \"%s\"", name))); + errmsg("could not parse setting for parameter \"%s\"", name))); free(name); continue; } /* - * We process all these options at SUSET level. We assume that - * the right to insert an option into pg_database or pg_authid was - * checked when it was inserted. + * We process all these options at SUSET level. We assume that the + * right to insert an option into pg_database or pg_authid was checked + * when it was inserted. */ SetConfigOption(name, value, PGC_SUSET, source); @@ -5515,7 +5504,7 @@ assign_log_destination(const char *value, bool doit, GucSource source) if (source >= PGC_S_INTERACTIVE) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid list syntax for parameter \"log_destination\""))); + errmsg("invalid list syntax for parameter \"log_destination\""))); return NULL; } @@ -5538,8 +5527,8 @@ assign_log_destination(const char *value, bool doit, GucSource source) if (source >= PGC_S_INTERACTIVE) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unrecognized \"log_destination\" key word: \"%s\"", - tok))); + errmsg("unrecognized \"log_destination\" key word: \"%s\"", + tok))); pfree(rawstring); list_free(elemlist); return NULL; @@ -5560,7 +5549,7 @@ assign_log_destination(const char *value, bool doit, GucSource source) static const char * assign_syslog_facility(const char *facility, bool doit, GucSource source) { - int syslog_fac; + int syslog_fac; if (pg_strcasecmp(facility, "LOCAL0") == 0) syslog_fac = LOG_LOCAL0; @@ -5599,8 +5588,7 @@ assign_syslog_ident(const char *ident, bool doit, GucSource source) return ident; } - -#endif /* HAVE_SYSLOG */ +#endif /* HAVE_SYSLOG */ static const char * @@ -5690,8 +5678,8 @@ assign_msglvl(int *var, const char *newval, bool doit, GucSource source) } /* - * Client_min_messages always prints 'info', but we allow it as a - * value anyway. + * Client_min_messages always prints 'info', but we allow it as a value + * anyway. */ else if (pg_strcasecmp(newval, "info") == 0) { @@ -5784,8 +5772,8 @@ static const char * show_num_temp_buffers(void) { /* - * We show the GUC var until local buffers have been initialized, - * and NLocBuffer afterwards. + * We show the GUC var until local buffers have been initialized, and + * NLocBuffer afterwards. */ static char nbuf[32]; @@ -5801,7 +5789,7 @@ assign_phony_autocommit(bool newval, bool doit, GucSource source) if (doit && source >= PGC_S_INTERACTIVE) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("SET AUTOCOMMIT TO OFF is no longer supported"))); + errmsg("SET AUTOCOMMIT TO OFF is no longer supported"))); return false; } return true; @@ -5844,8 +5832,8 @@ assign_custom_variable_classes(const char *newval, bool doit, GucSource source) if (hasSpaceAfterToken || !isalnum(c)) { /* - * Syntax error due to token following space after token or - * non alpha numeric character + * Syntax error due to token following space after token or non + * alpha numeric character */ ereport(LOG, (errcode(ERRCODE_SYNTAX_ERROR), diff --git a/src/backend/utils/misc/pg_rusage.c b/src/backend/utils/misc/pg_rusage.c index a4a6d9e586..cf7bbb427c 100644 --- a/src/backend/utils/misc/pg_rusage.c +++ b/src/backend/utils/misc/pg_rusage.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/pg_rusage.c,v 1.1 2005/10/03 22:52:23 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/pg_rusage.c,v 1.2 2005/10/15 02:49:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -65,9 +65,9 @@ pg_rusage_show(const PGRUsage *ru0) snprintf(result, sizeof(result), "CPU %d.%02ds/%d.%02du sec elapsed %d.%02d sec", (int) (ru1.ru.ru_stime.tv_sec - ru0->ru.ru_stime.tv_sec), - (int) (ru1.ru.ru_stime.tv_usec - ru0->ru.ru_stime.tv_usec) / 10000, + (int) (ru1.ru.ru_stime.tv_usec - ru0->ru.ru_stime.tv_usec) / 10000, (int) (ru1.ru.ru_utime.tv_sec - ru0->ru.ru_utime.tv_sec), - (int) (ru1.ru.ru_utime.tv_usec - ru0->ru.ru_utime.tv_usec) / 10000, + (int) (ru1.ru.ru_utime.tv_usec - ru0->ru.ru_utime.tv_usec) / 10000, (int) (ru1.tv.tv_sec - ru0->tv.tv_sec), (int) (ru1.tv.tv_usec - ru0->tv.tv_usec) / 10000); diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c index 1627cf49f7..af1421cd2f 100644 --- a/src/backend/utils/misc/ps_status.c +++ b/src/backend/utils/misc/ps_status.c @@ -5,7 +5,7 @@ * to contain some useful information. Mechanism differs wildly across * platforms. * - * $PostgreSQL: pgsql/src/backend/utils/misc/ps_status.c,v 1.24 2005/05/24 07:16:27 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/ps_status.c,v 1.25 2005/10/15 02:49:36 momjian Exp $ * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * various details abducted from various places @@ -85,7 +85,6 @@ extern char **environ; #define PS_BUFFER_SIZE 256 static char ps_buffer[PS_BUFFER_SIZE]; static const size_t ps_buffer_size = PS_BUFFER_SIZE; - #else /* PS_USE_CLOBBER_ARGV */ static char *ps_buffer; /* will point to argv area */ static size_t ps_buffer_size; /* space determined at run time */ @@ -98,20 +97,22 @@ static int save_argc; static char **save_argv; #ifdef WIN32 - /* - * Win32 does not support showing any changed arguments. To make it - * at all possible to track which backend is doing what, we create - * a named object that can be viewed with for example Process Explorer - */ + + /* + * Win32 does not support showing any changed arguments. To make it at all + * possible to track which backend is doing what, we create a named object + * that can be viewed with for example Process Explorer + */ static HANDLE ident_handle = INVALID_HANDLE_VALUE; -static void pgwin32_update_ident(char *ident) +static void +pgwin32_update_ident(char *ident) { - char name[PS_BUFFER_SIZE+32]; + char name[PS_BUFFER_SIZE + 32]; if (ident_handle != INVALID_HANDLE_VALUE) CloseHandle(ident_handle); - sprintf(name,"pgident: %s",ident); + sprintf(name, "pgident: %s", ident); ident_handle = CreateEvent(NULL, TRUE, @@ -130,7 +131,7 @@ static void pgwin32_update_ident(char *ident) * environment strings may be moved, so this should be called before any code * that might try to hang onto a getenv() result.) */ -char ** +char ** save_ps_display_args(int argc, char **argv) { save_argc = argc; @@ -139,8 +140,8 @@ save_ps_display_args(int argc, char **argv) #if defined(PS_USE_CLOBBER_ARGV) /* - * If we're going to overwrite the argv area, count the available - * space. Also move the environment to make additional room. + * If we're going to overwrite the argv area, count the available space. + * Also move the environment to make additional room. */ { char *end_of_area = NULL; @@ -193,12 +194,12 @@ save_ps_display_args(int argc, char **argv) * argument parsing purposes. * * (NB: do NOT think to remove the copying of argv[], even though - * postmaster.c finishes looking at argv[] long before we ever - * consider changing the ps display. On some platforms, getopt() - * keeps pointers into the argv array, and will get horribly confused - * when it is re-called to analyze a subprocess' argument string if - * the argv storage has been clobbered meanwhile. Other platforms - * have other dependencies on argv[]. + * postmaster.c finishes looking at argv[] long before we ever consider + * changing the ps display. On some platforms, getopt() keeps pointers + * into the argv array, and will get horribly confused when it is + * re-called to analyze a subprocess' argument string if the argv storage + * has been clobbered meanwhile. Other platforms have other dependencies + * on argv[]. */ { char **new_argv; @@ -220,8 +221,7 @@ save_ps_display_args(int argc, char **argv) argv = new_argv; } -#endif /* PS_USE_CHANGE_ARGV or - * PS_USE_CLOBBER_ARGV */ +#endif /* PS_USE_CHANGE_ARGV or PS_USE_CLOBBER_ARGV */ return argv; } @@ -278,8 +278,8 @@ init_ps_display(const char *username, const char *dbname, #ifdef PS_USE_SETPROCTITLE /* - * apparently setproctitle() already adds a `progname:' prefix to the - * ps line + * apparently setproctitle() already adds a `progname:' prefix to the ps + * line */ snprintf(ps_buffer, ps_buffer_size, "%s %s %s ", @@ -295,7 +295,6 @@ init_ps_display(const char *username, const char *dbname, #ifdef WIN32 pgwin32_update_ident(ps_buffer); #endif - #endif /* not PS_USE_NONE */ } @@ -360,7 +359,6 @@ set_ps_display(const char *activity) #ifdef WIN32 pgwin32_update_ident(ps_buffer); #endif - #endif /* not PS_USE_NONE */ } diff --git a/src/backend/utils/misc/superuser.c b/src/backend/utils/misc/superuser.c index c9c17cef70..6eba2fb935 100644 --- a/src/backend/utils/misc/superuser.c +++ b/src/backend/utils/misc/superuser.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/superuser.c,v 1.33 2005/08/15 02:40:26 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/superuser.c,v 1.34 2005/10/15 02:49:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -32,9 +32,9 @@ * the status of the last requested roleid. The cache can be flushed * at need by watching for cache update events on pg_authid. */ -static Oid last_roleid = InvalidOid; /* InvalidOid == cache not valid */ -static bool last_roleid_is_super = false; -static bool roleid_callback_registered = false; +static Oid last_roleid = InvalidOid; /* InvalidOid == cache not valid */ +static bool last_roleid_is_super = false; +static bool roleid_callback_registered = false; static void RoleidCallback(Datum arg, Oid relid); |