Changeset: 575249331b03 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/575249331b03
Modified Files:
sql/server/sql_parser.y
sql/server/sql_scan.c
Branch: Jun2023
Log Message:
Implemented WITHOUT TIME ZONE which is semantically the same as leaving it out
completely.
diffs (39 lines):
diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y
--- a/sql/server/sql_parser.y
+++ b/sql/server/sql_parser.y
@@ -710,7 +710,7 @@ SQLCODE SQLERROR UNDER WHENEVER
%token<sval> PUBLIC REFERENCES SCHEMA SET AUTO_COMMIT
%token RETURN
-%token ALTER ADD TABLE COLUMN TO UNIQUE VALUES VIEW WHERE WITH
+%token ALTER ADD TABLE COLUMN TO UNIQUE VALUES VIEW WHERE WITH WITHOUT
%token<sval> sqlDATE TIME TIMESTAMP INTERVAL
%token CENTURY DECADE YEAR QUARTER DOW DOY MONTH WEEK DAY HOUR MINUTE SECOND
EPOCH ZONE
%token LIMIT OFFSET SAMPLE SEED
@@ -4565,6 +4565,7 @@ opt_sign:
tz:
WITH TIME ZONE { $$ = 1; }
+ | WITHOUT TIME ZONE { $$ = 0; } /* the default */
| /* empty */ { $$ = 0; }
;
@@ -5551,6 +5552,7 @@ non_reserved_word:
| TIMESTAMP { $$ = sa_strdup(SA, "timestamp"); } /* sloppy: officially
reserved */
| UESCAPE { $$ = sa_strdup(SA, "uescape"); } /* sloppy: officially
reserved */
| VALUE { $$ = sa_strdup(SA, "value"); } /* sloppy:
officially reserved */
+| WITHOUT { $$ = sa_strdup(SA, "without"); } /* sloppy: officially
reserved */
| ACTION { $$ = sa_strdup(SA, "action"); }
| ANALYZE { $$ = sa_strdup(SA, "analyze"); }
diff --git a/sql/server/sql_scan.c b/sql/server/sql_scan.c
--- a/sql/server/sql_scan.c
+++ b/sql/server/sql_scan.c
@@ -317,6 +317,7 @@ scanner_init_keywords(void)
failed += keywords_insert("VIEW", VIEW);
failed += keywords_insert("WHERE", WHERE);
failed += keywords_insert("WITH", WITH);
+ failed += keywords_insert("WITHOUT", WITHOUT);
failed += keywords_insert("DATA", DATA);
failed += keywords_insert("DATE", sqlDATE);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]