Skip to content

Commit 0fec000

Browse files
committed
Renumber GUC_* constants.
This moves all the regular flags back together (for aesthetic reasons), and makes room for more GUC_UNIT_* types.
1 parent 1b63026 commit 0fec000

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/include/utils/guc.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,22 +201,21 @@ typedef enum
201201
#define GUC_CUSTOM_PLACEHOLDER 0x0080 /* placeholder for custom variable */
202202
#define GUC_SUPERUSER_ONLY 0x0100 /* show only to superusers */
203203
#define GUC_IS_NAME 0x0200 /* limit string to NAMEDATALEN-1 */
204+
#define GUC_NOT_WHILE_SEC_REST 0x0400 /* can't set if security restricted */
205+
#define GUC_DISALLOW_IN_AUTO_FILE 0x0800 /* can't set in PG_AUTOCONF_FILENAME */
204206

205-
#define GUC_UNIT_KB 0x0400 /* value is in kilobytes */
206-
#define GUC_UNIT_BLOCKS 0x0800 /* value is in blocks */
207-
#define GUC_UNIT_XBLOCKS 0x0C00 /* value is in xlog blocks */
208-
#define GUC_UNIT_MEMORY 0x0C00 /* mask for KB, BLOCKS, XBLOCKS */
207+
#define GUC_UNIT_KB 0x1000 /* value is in kilobytes */
208+
#define GUC_UNIT_BLOCKS 0x2000 /* value is in blocks */
209+
#define GUC_UNIT_XBLOCKS 0x3000 /* value is in xlog blocks */
210+
#define GUC_UNIT_MEMORY 0xF000 /* mask for KB, BLOCKS, XBLOCKS */
209211

210-
#define GUC_UNIT_MS 0x1000 /* value is in milliseconds */
211-
#define GUC_UNIT_S 0x2000 /* value is in seconds */
212-
#define GUC_UNIT_MIN 0x4000 /* value is in minutes */
213-
#define GUC_UNIT_TIME 0x7000 /* mask for MS, S, MIN */
212+
#define GUC_UNIT_MS 0x10000 /* value is in milliseconds */
213+
#define GUC_UNIT_S 0x20000 /* value is in seconds */
214+
#define GUC_UNIT_MIN 0x30000 /* value is in minutes */
215+
#define GUC_UNIT_TIME 0xF0000 /* mask for MS, S, MIN */
214216

215217
#define GUC_UNIT (GUC_UNIT_MEMORY | GUC_UNIT_TIME)
216218

217-
#define GUC_NOT_WHILE_SEC_REST 0x8000 /* can't set if security restricted */
218-
#define GUC_DISALLOW_IN_AUTO_FILE 0x00010000 /* can't set in
219-
* PG_AUTOCONF_FILENAME */
220219

221220
/* GUC vars that are actually declared in guc.c, rather than elsewhere */
222221
extern bool log_duration;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy