aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2021-04-23 19:10:24 +0900
committerFujii Masao <fujii@postgresql.org>2021-04-23 19:10:24 +0900
commit3f20d5f37086e548c32ddb9d6ae09c2e1ce300ce (patch)
tree147836abdea963d1c1da340810080a67fb19661c
parent7531fcb1fcf5b3ea2f49959a3f095c083e3fc4c4 (diff)
downloadpostgresql-3f20d5f37086e548c32ddb9d6ae09c2e1ce300ce.tar.gz
postgresql-3f20d5f37086e548c32ddb9d6ae09c2e1ce300ce.zip
Reorder COMPRESSION option in gram.y and parsenodes.h into alphabetical order.
Commit bbe0a81db6 introduced "INCLUDING COMPRESSION" option in CREATE TABLE command, but previously TableLikeOption in gram.y and parsenodes.h didn't classify this new option in alphabetical order with the rest. Author: Fujii Masao Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/YHerAixOhfR1ryXa@paquier.xyz
-rw-r--r--src/backend/parser/gram.y2
-rw-r--r--src/include/nodes/parsenodes.h16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 73494002ad3..b4ab4014c87 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -3760,6 +3760,7 @@ TableLikeOptionList:
TableLikeOption:
COMMENTS { $$ = CREATE_TABLE_LIKE_COMMENTS; }
+ | COMPRESSION { $$ = CREATE_TABLE_LIKE_COMPRESSION; }
| CONSTRAINTS { $$ = CREATE_TABLE_LIKE_CONSTRAINTS; }
| DEFAULTS { $$ = CREATE_TABLE_LIKE_DEFAULTS; }
| IDENTITY_P { $$ = CREATE_TABLE_LIKE_IDENTITY; }
@@ -3767,7 +3768,6 @@ TableLikeOption:
| INDEXES { $$ = CREATE_TABLE_LIKE_INDEXES; }
| STATISTICS { $$ = CREATE_TABLE_LIKE_STATISTICS; }
| STORAGE { $$ = CREATE_TABLE_LIKE_STORAGE; }
- | COMPRESSION { $$ = CREATE_TABLE_LIKE_COMPRESSION; }
| ALL { $$ = CREATE_TABLE_LIKE_ALL; }
;
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 7a44bccdd3b..615dfa26aa2 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -690,14 +690,14 @@ typedef struct TableLikeClause
typedef enum TableLikeOption
{
CREATE_TABLE_LIKE_COMMENTS = 1 << 0,
- CREATE_TABLE_LIKE_CONSTRAINTS = 1 << 1,
- CREATE_TABLE_LIKE_DEFAULTS = 1 << 2,
- CREATE_TABLE_LIKE_GENERATED = 1 << 3,
- CREATE_TABLE_LIKE_IDENTITY = 1 << 4,
- CREATE_TABLE_LIKE_INDEXES = 1 << 5,
- CREATE_TABLE_LIKE_STATISTICS = 1 << 6,
- CREATE_TABLE_LIKE_STORAGE = 1 << 7,
- CREATE_TABLE_LIKE_COMPRESSION = 1 << 8,
+ CREATE_TABLE_LIKE_COMPRESSION = 1 << 1,
+ CREATE_TABLE_LIKE_CONSTRAINTS = 1 << 2,
+ CREATE_TABLE_LIKE_DEFAULTS = 1 << 3,
+ CREATE_TABLE_LIKE_GENERATED = 1 << 4,
+ CREATE_TABLE_LIKE_IDENTITY = 1 << 5,
+ CREATE_TABLE_LIKE_INDEXES = 1 << 6,
+ CREATE_TABLE_LIKE_STATISTICS = 1 << 7,
+ CREATE_TABLE_LIKE_STORAGE = 1 << 8,
CREATE_TABLE_LIKE_ALL = PG_INT32_MAX
} TableLikeOption;