Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7ac918a

Browse files
committed
Renumber GUC flags for a bit more sanity.
Push the units fields over to the left so that all the single-bitflags can be together. I considered rearranging the single-bitflags to try to group flags with similar purposes, but eventuallydecided that that involved too many judgment calls.Discussion:https://postgr.es/m/17385-9ee529fb091f0ce5@postgresql.org
1 parent3853664 commit7ac918a

File tree

1 file changed

+32
-37
lines changed

1 file changed

+32
-37
lines changed

‎src/include/utils/guc.h

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -202,44 +202,39 @@ typedef enum
202202
#defineGUC_QUALIFIER_SEPARATOR '.'
203203

204204
/*
205-
* bit values in "flags" of a GUC variable
205+
* Bit values in "flags" of a GUC variable. Note that these don't appear
206+
* on disk, so we can reassign their values freely.
206207
*/
207-
#defineGUC_LIST_INPUT0x0001/* input can be list format */
208-
#defineGUC_LIST_QUOTE0x0002/* double-quote list elements */
209-
#defineGUC_NO_SHOW_ALL0x0004/* exclude from SHOW ALL */
210-
#defineGUC_NO_RESET 0x400000/* disallow RESET and SAVE */
211-
#defineGUC_NO_RESET_ALL0x0008/* exclude from RESET ALL */
212-
#defineGUC_REPORT0x0010/* auto-report changes to client */
213-
#defineGUC_NOT_IN_SAMPLE0x0020/* not in postgresql.conf.sample */
214-
#defineGUC_DISALLOW_IN_FILE0x0040/* can't set in postgresql.conf */
215-
#defineGUC_CUSTOM_PLACEHOLDER0x0080/* placeholder for custom variable */
216-
#defineGUC_SUPERUSER_ONLY0x0100/* show only to superusers */
217-
#defineGUC_IS_NAME0x0200/* limit string to NAMEDATALEN-1 */
218-
#defineGUC_NOT_WHILE_SEC_REST0x0400/* can't set if security restricted */
219-
#defineGUC_DISALLOW_IN_AUTO_FILE 0x0800/* can't set in
220-
* PG_AUTOCONF_FILENAME */
221-
222-
#defineGUC_UNIT_KB0x1000/* value is in kilobytes */
223-
#defineGUC_UNIT_BLOCKS0x2000/* value is in blocks */
224-
#defineGUC_UNIT_XBLOCKS0x3000/* value is in xlog blocks */
225-
#defineGUC_UNIT_MB0x4000/* value is in megabytes */
226-
#defineGUC_UNIT_BYTE0x5000/* value is in bytes */
227-
#defineGUC_UNIT_MEMORY0xF000/* mask for size-related units */
228-
229-
#defineGUC_UNIT_MS 0x10000/* value is in milliseconds */
230-
#defineGUC_UNIT_S 0x20000/* value is in seconds */
231-
#defineGUC_UNIT_MIN 0x30000/* value is in minutes */
232-
#defineGUC_UNIT_TIME 0xF0000/* mask for time-related units */
233-
234-
#defineGUC_EXPLAIN 0x100000/* include in explain */
235-
236-
/*
237-
* GUC_RUNTIME_COMPUTED is intended for runtime-computed GUCs that are only
238-
* available via 'postgres -C' if the server is not running.
239-
*/
240-
#defineGUC_RUNTIME_COMPUTED 0x200000
241-
242-
#defineGUC_UNIT(GUC_UNIT_MEMORY | GUC_UNIT_TIME)
208+
#defineGUC_LIST_INPUT 0x000001/* input can be list format */
209+
#defineGUC_LIST_QUOTE 0x000002/* double-quote list elements */
210+
#defineGUC_NO_SHOW_ALL 0x000004/* exclude from SHOW ALL */
211+
#defineGUC_NO_RESET 0x000008/* disallow RESET and SAVE */
212+
#defineGUC_NO_RESET_ALL 0x000010/* exclude from RESET ALL */
213+
#defineGUC_EXPLAIN 0x000020/* include in EXPLAIN */
214+
#defineGUC_REPORT 0x000040/* auto-report changes to client */
215+
#defineGUC_NOT_IN_SAMPLE 0x000080/* not in postgresql.conf.sample */
216+
#defineGUC_DISALLOW_IN_FILE 0x000100/* can't set in postgresql.conf */
217+
#defineGUC_CUSTOM_PLACEHOLDER 0x000200/* placeholder for custom variable */
218+
#defineGUC_SUPERUSER_ONLY 0x000400/* show only to superusers */
219+
#defineGUC_IS_NAME 0x000800/* limit string to NAMEDATALEN-1 */
220+
#defineGUC_NOT_WHILE_SEC_REST 0x001000/* can't set if security restricted */
221+
#defineGUC_DISALLOW_IN_AUTO_FILE \
222+
0x002000/* can't set in PG_AUTOCONF_FILENAME */
223+
#defineGUC_RUNTIME_COMPUTED 0x004000/* delay processing in 'postgres -C' */
224+
225+
#defineGUC_UNIT_KB 0x01000000/* value is in kilobytes */
226+
#defineGUC_UNIT_BLOCKS 0x02000000/* value is in blocks */
227+
#defineGUC_UNIT_XBLOCKS 0x03000000/* value is in xlog blocks */
228+
#defineGUC_UNIT_MB 0x04000000/* value is in megabytes */
229+
#defineGUC_UNIT_BYTE 0x05000000/* value is in bytes */
230+
#defineGUC_UNIT_MEMORY 0x0F000000/* mask for size-related units */
231+
232+
#defineGUC_UNIT_MS 0x10000000/* value is in milliseconds */
233+
#defineGUC_UNIT_S 0x20000000/* value is in seconds */
234+
#defineGUC_UNIT_MIN 0x30000000/* value is in minutes */
235+
#defineGUC_UNIT_TIME 0x70000000/* mask for time-related units */
236+
237+
#defineGUC_UNIT (GUC_UNIT_MEMORY | GUC_UNIT_TIME)
243238

244239

245240
/* GUC vars that are actually defined in guc_tables.c, rather than elsewhere */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp