Changeset: 129fa2a238d0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/129fa2a238d0
Modified Files:
        clients/mapiclient/mhelp.c
        sql/ChangeLog
        sql/server/sql_parser.y
Branch: default
Log Message:

Update mhelp and sql/ChangeLog with new BY DEFAULT option.


diffs (43 lines):

diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -673,9 +673,9 @@ SQLhelp sqlhelp2[] = {
         NULL},
        {"generated_column",
         NULL,
-        "AUTO_INCREMENT | GENERATED ALWAYS AS IDENTITY [ '(' [ AS data_type] [ 
START [WITH start]] [INCREMENT BY increment]\n"
-        "[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NO MAXVALUE] 
[CACHE cachevalue] [[NO] CYCLE] ')' ] ",
-        "data_type",
+        "AUTO_INCREMENT | GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ '(' 
[ AS seq_int_datatype] [ START [WITH start]]\n"
+        " [INCREMENT BY increment] [MINVALUE minvalue | NO MINVALUE] [MAXVALUE 
maxvalue | NO MAXVALUE] [CACHE cachevalue] [[NO] CYCLE] ')' ]",
+        "seq_int_datatype",
         "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-types/serial-types/"},
        {"global_privileges",
         NULL,
diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -16,6 +16,12 @@
   Note: MonetDB does NOT support catalog qualifiers in object names, so all the
   _CATALOG columns in these information_schema views will allways contain NULL.
 
+* Mon Aug 21 2023 Niels Nes <[email protected]>
+- Added support for generated column syntax:
+   GENERATED BY DEFAULT AS IDENTITY ...
+  This allows the user to override the default generated sequence value
+  during inserts.
+
 * Fri Jul 7 2023 Niels Nes <[email protected]>
 - Added SQL support for: <result offset clause> and <fetch first clause>
   in  <query expression> ::=
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
@@ -1906,6 +1906,7 @@ column_def:
                }
  |  column serial_or_bigserial
                { /* SERIAL = INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY 
*/
+                 /* BIGSERIAL = BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY 
KEY */
                        /* handle multi-statements by wrapping them in a list */
                        sql_subtype it;
                        dlist* stmts;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to