mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Some infrastructure changes for the upcoming auto-explain contrib module:
* Refactor explain.c slightly to export a convenient-to-use subroutine for printing EXPLAIN results. * Provide hooks for plugins to get control at ExecutorStart and ExecutorEnd as well as ExecutorRun. * Add some minimal support for tracking the total runtime of ExecutorRun. This code won't actually do anything unless a plugin prods it to. * Change the API of the DefineCustomXXXVariable functions to allow nonzero "flags" to be specified for a custom GUC variable. While at it, also make the "bootstrap" default value for custom GUCs be explicitly specified as a parameter to these functions. This is to eliminate confusion over where the default comes from, as has been expressed in the past by some users of the custom-variable facility. * Refactor GUC code a bit to ensure that a custom variable gets initialized to something valid (like its default value) even if the placeholder value was invalid.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/guc_tables.h,v 1.43 2008/09/30 10:52:14 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/guc_tables.h,v 1.44 2008/11/19 01:10:23 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -129,27 +129,7 @@ struct config_generic
|
||||
int sourceline; /* line in source file */
|
||||
};
|
||||
|
||||
/* bit values in flags field */
|
||||
#define GUC_LIST_INPUT 0x0001 /* input can be list format */
|
||||
#define GUC_LIST_QUOTE 0x0002 /* double-quote list elements */
|
||||
#define GUC_NO_SHOW_ALL 0x0004 /* exclude from SHOW ALL */
|
||||
#define GUC_NO_RESET_ALL 0x0008 /* exclude from RESET ALL */
|
||||
#define GUC_REPORT 0x0010 /* auto-report changes to client */
|
||||
#define GUC_NOT_IN_SAMPLE 0x0020 /* not in postgresql.conf.sample */
|
||||
#define GUC_DISALLOW_IN_FILE 0x0040 /* can't set in postgresql.conf */
|
||||
#define GUC_CUSTOM_PLACEHOLDER 0x0080 /* placeholder for custom variable */
|
||||
#define GUC_SUPERUSER_ONLY 0x0100 /* show only to superusers */
|
||||
#define GUC_IS_NAME 0x0200 /* limit string to NAMEDATALEN-1 */
|
||||
|
||||
#define GUC_UNIT_KB 0x0400 /* value is in kilobytes */
|
||||
#define GUC_UNIT_BLOCKS 0x0800 /* value is in blocks */
|
||||
#define GUC_UNIT_XBLOCKS 0x0C00 /* value is in xlog blocks */
|
||||
#define GUC_UNIT_MEMORY 0x0C00 /* mask for KB, BLOCKS, XBLOCKS */
|
||||
|
||||
#define GUC_UNIT_MS 0x1000 /* value is in milliseconds */
|
||||
#define GUC_UNIT_S 0x2000 /* value is in seconds */
|
||||
#define GUC_UNIT_MIN 0x4000 /* value is in minutes */
|
||||
#define GUC_UNIT_TIME 0x7000 /* mask for MS, S, MIN */
|
||||
/* bit values in flags field are defined in guc.h */
|
||||
|
||||
/* bit values in status field */
|
||||
#define GUC_IS_IN_FILE 0x0001 /* found it in config file */
|
||||
|
Reference in New Issue
Block a user