typedef_enum_pgsscantype.h.txt

text/plain

Filename: typedef_enum_pgsscantype.h.txt
Type: text/plain
Part: 0
Message: Re: pg_plan_advice
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h
index c175ee95b68..772306d8262 100644
--- a/src/include/nodes/pathnodes.h
+++ b/src/include/nodes/pathnodes.h
@@ -63,25 +63,27 @@
  * all of the others, but that doesn't work here: unsetting PGS_SEQSCAN,
  * for instance, would disable both partial and non-partial sequential scans.
  */
-#define PGS_SEQSCAN					0x00000001
-#define PGS_INDEXSCAN				0x00000002
-#define PGS_INDEXONLYSCAN			0x00000004
-#define PGS_BITMAPSCAN				0x00000008
-#define PGS_TIDSCAN					0x00000010
-#define PGS_FOREIGNJOIN				0x00000020
-#define PGS_MERGEJOIN_PLAIN			0x00000040
-#define PGS_MERGEJOIN_MATERIALIZE	0x00000080
-#define PGS_NESTLOOP_PLAIN			0x00000100
-#define PGS_NESTLOOP_MATERIALIZE	0x00000200
-#define PGS_NESTLOOP_MEMOIZE		0x00000400
-#define PGS_HASHJOIN				0x00000800
-#define PGS_APPEND					0x00001000
-#define PGS_MERGE_APPEND			0x00002000
-#define PGS_GATHER					0x00004000
-#define PGS_GATHER_MERGE			0x00008000
-#define PGS_CONSIDER_INDEXONLY		0x00010000
-#define PGS_CONSIDER_PARTITIONWISE	0x00020000
-#define PGS_CONSIDER_NONPARTIAL		0x00040000
+typedef enum {
+	PGS_SEQSCAN					= 1 << 0,
+	PGS_INDEXSCAN				= 1 << 1,
+	PGS_INDEXONLYSCAN			= 1 << 2,
+	PGS_BITMAPSCAN				= 1 << 3,
+	PGS_TIDSCAN					= 1 << 4,
+	PGS_FOREIGNJOIN				= 1 << 5,
+	PGS_MERGEJOIN_PLAIN			= 1 << 6,
+	PGS_MERGEJOIN_MATERIALIZE	= 1 << 7,
+	PGS_NESTLOOP_PLAIN			= 1 << 8,
+	PGS_NESTLOOP_MATERIALIZE	= 1 << 9,
+	PGS_NESTLOOP_MEMOIZE		= 1 << 10,
+	PGS_HASHJOIN				= 1 << 11,
+	PGS_APPEND					= 1 << 12,
+	PGS_MERGE_APPEND			= 1 << 13,
+	PGS_GATHER					= 1 << 14,
+	PGS_GATHER_MERGE			= 1 << 15,
+	PGS_CONSIDER_INDEXONLY		= 1 << 16,
+	PGS_CONSIDER_PARTITIONWISE	= 1 << 17,
+	PGS_CONSIDER_NONPARTIAL		= 1 << 18
+} PgsScanType;
 
 /*
  * Convenience macros for useful combination of the bits defined above.