SQLite Forum

Timeline
Login

50 most recent forum posts by user mingodad

2021-08-23
08:06 Reply: about "strict" mode (artifact: c91fd13e40 user: mingodad)
Can also an extended sqlite_master be included on this proposal ?

So several extra info could be added there to allow customization/query ?

Maybe include an extra table sqlite_[strict] to save/customize the strict application or user defined options ?
2021-08-22
10:59 Reply: about "strict" mode (artifact: cc551b4da8 user: mingodad)
Here is a sample to test the "pedantic" patch:
====

select "23 % 3", 23 % 3;
select "12.3 % 3", 12.3 % 3;
select "12 % 2.5", 12 % 2.5;

select "23 / 3", 23 / 3;
select "12.3 / 3", 12.3 / 3;
select "12 / 2.5", 12 / 2.5;

create table ta(a text, b integer, c float);

select 'insert declared types == value types';
insert into ta(a,b,c) values('a', 1, 2.0);

select 'insert declared types != value types text';
insert into ta(a,b,c) values('b', '1', '2.0');

select 'insert declared types != value types';
insert into ta(a,b,c) values('c', 1.0, 2);

select 'update declared types == value types';
update ta set a = 'a' ,b = 1, c = 2.0 where a = 'a';

select 'update declared types != value types text';
update ta set a = 'a' ,b = '1', c = '2.0' where a = 'a';

select 'update declared types != value types';
update ta set a = 'a' ,b = 1.0, c = 2 where a = 'a';

select 'update one value declared types != value types';
update ta set b = 1.0 where a = 'a';

select 'update one value declared types != value types';
update ta set a = 49 where a = 'b';


====

Output default sqlite:

====

23 % 3|2
12.3 % 3|0.0
12 % 2.5|0.0
23 / 3|7
12.3 / 3|4.1
12 / 2.5|4.8
insert declared types == value types
insert declared types != value types text
insert declared types != value types
update declared types == value types
update declared types != value types text
update declared types != value types
update one value declared types != value types
update one value declared types != value types

====

Output of sqlite with "pedantic":

====

23 % 3|2
FP Remainder received non integer values 3.000000 :: 12.300000
12.3 % 3|0.0
FP Remainder received non integer values 2.500000 :: 12.000000
12 % 2.5|0.0
23 / 3|7
FP Division received non integer values 3.000000 :: 12.300000
12.3 / 3|4.1
FP Division received non integer values 2.500000 :: 12.000000
12 / 2.5|4.8
insert declared types == value types
insert declared types != value types text
Affinity applied on make record 1 : 1 : D
Affinity applied on make record 2 : 1 : E
insert declared types != value types
Affinity applied on make record 1 : 2 : D
update declared types == value types
update declared types != value types text
Affinity applied on make record 1 : 1 : D
Affinity applied on make record 2 : 1 : E
update declared types != value types
Affinity applied on make record 1 : 2 : D
update one value declared types != value types
Affinity applied on make record 1 : 2 : D
update one value declared types != value types
Affinity applied on make record 0 : 3 : B

====
2021-08-21
20:01 Reply: about "strict" mode (artifact: 7538f71354 user: mingodad)
And what about also somehow expose the changes shown here https://sqlite.org/forum/forumpost/692ae69237f2537b?t=h through a pragma ?

See the output whith some random expressions here https://sqlite.org/forum/forumpost/103d7294464fcde8?t=h

Something like: "PRAGMA pedantic"
2021-08-11
13:54 Reply: inner join bug with compound queries (artifact: 594995c7b4 user: mingodad)
Following the explanation a question came to my mind:

Have you done all the optimizations steps described by hand or sqlite shows that steps with a special parameter/flag ?
2021-08-09
13:26 Reply: Fail to calculate long expression (artifact: 6faa91f8cf user: mingodad)
And here is the output of fossil compiled with my sqlite changes and SQLITE_PEDANTIC when executing "stash save".

Ideally we should not rely on "implicit casts" (Affinity applied ...).

Noticed the line showing that fossil is relying on an "implicit casting".

Also I'm not sure why I've got the message about transactions "never commits".

=====
fossil stash save mywork

# Enter a description of what is being stashed.  Lines beginning
# with "#" are ignored.  Stash comments are plain text except
# newlines are not preserved.
#
# Since no default text editor is set using EDITOR or VISUAL
# environment variables or the "fossil set editor" command,
# and because no comment was specified using the "-m" or "-M"
# command-line options, you will need to enter the comment below.
# Type "." on a line by itself when you are done:
testing my changes.
.
Affinity applied on make record 4 : 2 : C
Transaction started at ./src/stash.c:573 never commits
=====
13:07 Reply: Fail to calculate long expression (artifact: 103d729446 user: mingodad)
And here is the output of the previous message SQL with sqlite compiled with my changes and SQLITE_PEDANTIC defined:

=====
sqlite3 < "text-expr.sql"
-- literal expression, integer values types rounded to floor
5592761191971
5744488517721
-- literal expression, integer values types rounded to ceil
9078588368871
9329444099871
-- literal expression, mixed values types
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- json array expression, mixed values types
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- json object expression, mixed values types
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- json object expression, text/mixed values types
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- text type declaration, mixed values
Affinity applied on make record 1 : 3 : B
Affinity applied on make record 2 : 3 : B
Affinity applied on make record 3 : 3 : B
Affinity applied on make record 4 : 3 : B
Affinity applied on make record 5 : 3 : B
Affinity applied on make record 6 : 3 : B
Affinity applied on make record 7 : 3 : B
Affinity applied on make record 8 : 3 : B
Affinity applied on make record 9 : 3 : B
Affinity applied on make record 10 : 3 : B
Affinity applied on make record 11 : 3 : B
Affinity applied on make record 12 : 3 : B
Affinity applied on make record 13 : 3 : B
Affinity applied on make record 14 : 3 : B
Affinity applied on make record 15 : 3 : B
Affinity applied on make record 16 : 3 : B
Affinity applied on make record 17 : 3 : B
Affinity applied on make record 18 : 3 : B
Affinity applied on make record 19 : 3 : B
Affinity applied on make record 20 : 3 : B
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- text type declaration, text/mixed values
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- blob type declaration, mixed values
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- integer type declaration, mixed values
Affinity applied on make record 2 : 2 : D
Affinity applied on make record 4 : 2 : D
Affinity applied on make record 6 : 2 : D
Affinity applied on make record 16 : 2 : D
Affinity applied on make record 17 : 2 : D
Affinity applied on make record 18 : 2 : D
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- integer/real type declaration, integer/real values
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- integer type declaration, real values
Affinity applied on make record 1 : 2 : D
Affinity applied on make record 2 : 2 : D
Affinity applied on make record 3 : 2 : D
Affinity applied on make record 4 : 2 : D
Affinity applied on make record 5 : 2 : D
Affinity applied on make record 6 : 2 : D
Affinity applied on make record 7 : 2 : D
Affinity applied on make record 8 : 2 : D
Affinity applied on make record 9 : 2 : D
Affinity applied on make record 10 : 2 : D
Affinity applied on make record 11 : 2 : D
Affinity applied on make record 12 : 2 : D
Affinity applied on make record 13 : 2 : D
Affinity applied on make record 14 : 2 : D
Affinity applied on make record 15 : 2 : D
Affinity applied on make record 16 : 2 : D
Affinity applied on make record 17 : 2 : D
Affinity applied on make record 18 : 2 : D
Affinity applied on make record 19 : 2 : D
Affinity applied on make record 20 : 2 : D
FP Remainder received non integer values 3.000000 :: 167.864400
8290383058308.3
8516465628803.37
-- literal expression, real values types
8035491468053.99
8260995146768.14
-- real type declaration, mixed values
8035491468053.99
8260995146768.14
-- real type declaration, real values
8035491468053.99
8260995146768.14
-- blob type declaration, real values
8035491468053.99
8260995146768.14
-- text type declaration, text/real values
8035491468053.99
8260995146768.14
-- json array expression, real values types
8035491468053.99
8260995146768.14
-- json object expression, real values types
8035491468053.99
8260995146768.14
-- json object expression, text/real values types
8035491468053.99
8260995146768.14
====
12:05 Reply: Fail to calculate long expression (artifact: a95ddf9bca user: mingodad)
On my previous message showing changes to "src/vdbe.c" I found a small mistake and edited fixing it and extended the simple test case a bit.

So if you plan to try it please check it on the sqlite forum.
12:01 Edit reply: Fail to calculate long expression (artifact: 692ae69237 user: mingodad)
After this post I looked at how I could minimally enable warning/error messages on some of the problems that using mixed data types can lead to unexpected results and come with this small changes to "src/vdbe.c" that can be activated when defining SQLITE_PEDANTIC macro.

====
-static void applyAffinity(
+static int applyAffinity(
   Mem *pRec,          /* The value to apply affinity to */
   char affinity,      /* The affinity to be applied */
   u8 enc              /* Use this text encoding */
 ){
+  int rc = 0;
   if( affinity>=SQLITE_AFF_NUMERIC ){
     assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
              || affinity==SQLITE_AFF_NUMERIC );
     if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/
       if( (pRec->flags & MEM_Real)==0 ){
-        if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
+        if( pRec->flags & MEM_Str ) {applyNumericAffinity(pRec,1); rc = 1;}
       }else{
-        sqlite3VdbeIntegerAffinity(pRec);
+        sqlite3VdbeIntegerAffinity(pRec); rc = 2;
       }
     }
   }else if( affinity==SQLITE_AFF_TEXT ){
     /* Only attempt the conversion to TEXT if there is an integer or real
     ** representation (blob and NULL do not get converted) but no string
    ** representation.  It would be harmless to repeat the conversion if
     ** there is already a string rep, but it is pointless to waste those
     ** CPU cycles. */
     if( 0==(pRec->flags&MEM_Str) ){ /*OPTIMIZATION-IF-FALSE*/
       if( (pRec->flags&(MEM_Real|MEM_Int|MEM_IntReal)) ){
         testcase( pRec->flags & MEM_Int );
         testcase( pRec->flags & MEM_Real );
         testcase( pRec->flags & MEM_IntReal );
-        sqlite3VdbeMemStringify(pRec, enc, 1);
+        sqlite3VdbeMemStringify(pRec, enc, 1); rc = 3;
       }
     }
     pRec->flags &= ~(MEM_Real|MEM_Int|MEM_IntReal);
   }
+  return rc;
 }
 
 ...
 
  case OP_Add:                   /* same as TK_PLUS, in1, in2, out3 */
 case OP_Subtract:              /* same as TK_MINUS, in1, in2, out3 */
@@ -1699,16 +1701,24 @@
     switch( pOp->opcode ){
       case OP_Add:         rB += rA;       break;
       case OP_Subtract:    rB -= rA;       break;
       case OP_Multiply:    rB *= rA;       break;
       case OP_Divide: {
+#ifdef SQLITE_PEDANTIC
+    if( ((type1 | type2) & MEM_Int)!=0 )
+        fprintf(stderr, "FP Division received non integer values %f :: %f\n", rA, rB);
+#endif
         /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
         if( rA==(double)0 ) goto arithmetic_result_is_null;
         rB /= rA;
         break;
       }
       default: {
+#ifdef SQLITE_PEDANTIC
+    if( ((type1 | type2) & MEM_Int)!=0 )
+        fprintf(stderr, "FP Remainder received non integer values %f :: %f\n", rA, rB);
+#endif
         iA = sqlite3VdbeIntValue(pIn1);
         iB = sqlite3VdbeIntValue(pIn2);
         if( iA==0 ) goto arithmetic_result_is_null;
         if( iA==-1 ) iA = 1;
         rB = (double)(iB % iA);
@@ -1838,11 +1848,11 @@
   break;
 }

 ...
 
        **
       ** Although sqlite3VdbeSerialGet() may read at most 8 bytes from the
       ** buffer passed to it, debugging function VdbeMemPrettyPrint() may
       ** read more.  Use the global constant sqlite3CtypeMap[] as the array,
       ** as that array is 256 bytes long (plenty for VdbeMemPrettyPrint())
@@ -2958,22 +2968,25 @@
   char *zAffinity;       /* The affinity string for the record */
   int file_format;       /* File format to use for encoding */
   u32 len;               /* Length of a field */
   u8 *zHdr;              /* Where to write next byte of the header */
   u8 *zPayload;          /* Where to write next byte of the payload */
+#ifdef SQLITE_PEDANTIC
+  int rc_affinity;
+#endif
 
   /* Assuming the record contains N fields, the record format looks
   ** like this:
   **
   ** ------------------------------------------------------------------------
  ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |
   ** ------------------------------------------------------------------------
   **
   ** Data(0) is taken from register P1.  Data(1) comes from register P1+1
   ** and so forth.
   **
-  ** Each type field is a varint representing the serial type of the 
+  ** Each type field is a varint representing the serial type of the
   ** corresponding data element (see sqlite3VdbeSerialType()). The
   ** hdr-size field is also a varint which is the offset from the beginning
   ** of the record to data0.
   */
   nData = 0;         /* Number of bytes of data space */
@@ -2996,11 +3009,18 @@
   */
   assert( pData0<=pLast );
   if( zAffinity ){
     pRec = pData0;
     do{
+#ifdef SQLITE_PEDANTIC
+    rc_affinity =
+#endif
       applyAffinity(pRec, zAffinity[0], encoding);
+#ifdef SQLITE_PEDANTIC
+    if(rc_affinity && !((rc_affinity == 2) && (zAffinity[0] == SQLITE_AFF_REAL)))
+        fprintf(stderr, "Affinity applied on make record %d : %d : %c\n", (int)(pRec-pData0), rc_affinity, zAffinity[0]);
+#endif
       if( zAffinity[0]==SQLITE_AFF_REAL && (pRec->flags & MEM_Int) ){
         pRec->flags |= MEM_IntReal;
         pRec->flags &= ~(MEM_Int);
       }
       REGISTER_TRACE((int)(pRec-aMem), pRec);
@@ -3160,11 +3180,11 @@
     nHdr += nVarint;
     if( nVarint<sqlite3VarintLen(nHdr) ) nHdr++;
   }
   nByte = nHdr+nData;
====

And here is a simple test:
====
select "23 % 3", 23 % 3;
select "12.3 % 3", 12.3 % 3;
select "12 % 2.5", 12 % 2.5;

select "23 / 3", 23 / 3;
select "12.3 / 3", 12.3 / 3;
select "12 / 2.5", 12 / 2.5;

create table ta(a text, b integer, c float);

select 'insert declared types == value types';
insert into ta(a,b,c) values('a', 1, 2.0);

select 'insert declared types != value types text';
insert into ta(a,b,c) values('b', '1', '2.0');

select 'insert declared types != value types';
insert into ta(a,b,c) values('c', 1.0, 2);

select 'update declared types == value types';
update ta set a = 'a' ,b = 1, c = 2.0 where a = 'a';

select 'update declared types != value types text';
update ta set a = 'a' ,b = '1', c = '2.0' where a = 'a';

select 'update declared types != value types';
update ta set a = 'a' ,b = 1.0, c = 2 where a = 'a';

select 'update one value declared types != value types';
update ta set b = 1.0 where a = 'a';

select 'update one value declared types != value types';
update ta set a = 49 where a = 'b';
====

Ouptut:
====
sqlite3 < test-affinity.sql 
23 % 3|2
FP Remainder received non integer values 3.000000 :: 12.300000
12.3 % 3|0.0
FP Remainder received non integer values 2.500000 :: 12.000000
12 % 2.5|0.0
23 / 3|7
FP Division received non integer values 3.000000 :: 12.300000
12.3 / 3|4.1
FP Division received non integer values 2.500000 :: 12.000000
12 / 2.5|4.8
insert declared types == value types
insert declared types != value types text
Affinity applied on make record 1 : 1 : D
Affinity applied on make record 2 : 1 : E
insert declared types != value types
Affinity applied on make record 1 : 2 : D
update declared types == value types
update declared types != value types text
Affinity applied on make record 1 : 1 : D
Affinity applied on make record 2 : 1 : E
update declared types != value types
Affinity applied on make record 1 : 2 : D
update one value declared types != value types
Affinity applied on make record 1 : 2 : D
update one value declared types != value types
Affinity applied on make record 0 : 3 : B
====
11:59 Edit reply: Fail to calculate long expression (artifact: 35656d50c3 user: mingodad)
After this post I looked at how I could minimally enable warning/error messages on some of the problems that using mixed data types can lead to unexpected results and come with this small changes to "src/vdbe.c" that can be activated when defining SQLITE_PEDANTIC macro.

====
-static void applyAffinity(
+static int applyAffinity(
   Mem *pRec,          /* The value to apply affinity to */
   char affinity,      /* The affinity to be applied */
   u8 enc              /* Use this text encoding */
 ){
+  int rc = 0;
   if( affinity>=SQLITE_AFF_NUMERIC ){
     assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
              || affinity==SQLITE_AFF_NUMERIC );
     if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/
       if( (pRec->flags & MEM_Real)==0 ){
-        if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
+        if( pRec->flags & MEM_Str ) {applyNumericAffinity(pRec,1); rc = 1;}
       }else{
-        sqlite3VdbeIntegerAffinity(pRec);
+        sqlite3VdbeIntegerAffinity(pRec); rc = 2;
       }
     }
   }else if( affinity==SQLITE_AFF_TEXT ){
     /* Only attempt the conversion to TEXT if there is an integer or real
     ** representation (blob and NULL do not get converted) but no string
    ** representation.  It would be harmless to repeat the conversion if
     ** there is already a string rep, but it is pointless to waste those
     ** CPU cycles. */
     if( 0==(pRec->flags&MEM_Str) ){ /*OPTIMIZATION-IF-FALSE*/
       if( (pRec->flags&(MEM_Real|MEM_Int|MEM_IntReal)) ){
         testcase( pRec->flags & MEM_Int );
         testcase( pRec->flags & MEM_Real );
         testcase( pRec->flags & MEM_IntReal );
-        sqlite3VdbeMemStringify(pRec, enc, 1);
+        sqlite3VdbeMemStringify(pRec, enc, 1); rc = 3;
       }
     }
     pRec->flags &= ~(MEM_Real|MEM_Int|MEM_IntReal);
   }
+  return rc;
 }
 
 ...
 
  case OP_Add:                   /* same as TK_PLUS, in1, in2, out3 */
 case OP_Subtract:              /* same as TK_MINUS, in1, in2, out3 */
@@ -1699,16 +1701,24 @@
     switch( pOp->opcode ){
       case OP_Add:         rB += rA;       break;
       case OP_Subtract:    rB -= rA;       break;
       case OP_Multiply:    rB *= rA;       break;
       case OP_Divide: {
+#ifdef SQLITE_PEDANTIC
+    if( ((type1 | type2) & MEM_Int)!=0 )
+        fprintf(stderr, "FP Division received non integer values %f :: %f\n", rA, rB);
+#endif
         /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
         if( rA==(double)0 ) goto arithmetic_result_is_null;
         rB /= rA;
         break;
       }
       default: {
+#ifdef SQLITE_PEDANTIC
+    if( ((type1 | type2) & MEM_Int)!=0 )
+        fprintf(stderr, "FP Remainder received non integer values %f :: %f\n", rA, rB);
+#endif
         iA = sqlite3VdbeIntValue(pIn1);
         iB = sqlite3VdbeIntValue(pIn2);
         if( iA==0 ) goto arithmetic_result_is_null;
         if( iA==-1 ) iA = 1;
         rB = (double)(iB % iA);
@@ -1838,11 +1848,11 @@
   break;
 }

 ...
 
        **
       ** Although sqlite3VdbeSerialGet() may read at most 8 bytes from the
       ** buffer passed to it, debugging function VdbeMemPrettyPrint() may
       ** read more.  Use the global constant sqlite3CtypeMap[] as the array,
       ** as that array is 256 bytes long (plenty for VdbeMemPrettyPrint())
@@ -2958,22 +2968,25 @@
   char *zAffinity;       /* The affinity string for the record */
   int file_format;       /* File format to use for encoding */
   u32 len;               /* Length of a field */
   u8 *zHdr;              /* Where to write next byte of the header */
   u8 *zPayload;          /* Where to write next byte of the payload */
+#ifdef SQLITE_PEDANTIC
+  int rc_affinity;
+#endif
 
   /* Assuming the record contains N fields, the record format looks
   ** like this:
   **
   ** ------------------------------------------------------------------------
  ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |
   ** ------------------------------------------------------------------------
   **
   ** Data(0) is taken from register P1.  Data(1) comes from register P1+1
   ** and so forth.
   **
-  ** Each type field is a varint representing the serial type of the 
+  ** Each type field is a varint representing the serial type of the
   ** corresponding data element (see sqlite3VdbeSerialType()). The
   ** hdr-size field is also a varint which is the offset from the beginning
   ** of the record to data0.
   */
   nData = 0;         /* Number of bytes of data space */
@@ -2996,11 +3009,18 @@
   */
   assert( pData0<=pLast );
   if( zAffinity ){
     pRec = pData0;
     do{
+#ifdef SQLITE_PEDANTIC
+    rc_affinity =
+#endif
       applyAffinity(pRec, zAffinity[0], encoding);
+#ifdef SQLITE_PEDANTIC
+    if(rc_affinity && !((rc_affinity == 2) && (zAffinity[0] == SQLITE_AFF_REAL)))
+        fprintf(stderr, "Affinity applied on make record %d : %d : %c\n", (int)(pRec-pData0), rc_affinity, zAffinity[0]);
+#endif
       if( zAffinity[0]==SQLITE_AFF_REAL && (pRec->flags & MEM_Int) ){
         pRec->flags |= MEM_IntReal;
         pRec->flags &= ~(MEM_Int);
       }
       REGISTER_TRACE((int)(pRec-aMem), pRec);
@@ -3160,11 +3180,11 @@
     nHdr += nVarint;
     if( nVarint<sqlite3VarintLen(nHdr) ) nHdr++;
   }
   nByte = nHdr+nData;
====

And here is a simple test:
====
select "23 % 3", 23 % 3;
select "12.3 % 3", 12.3 % 3;
select "12 % 2.5", 12 % 2.5;

select "23 / 3", 23 / 3;
select "12.3 / 3", 12.3 / 3;
select "12 / 2.5", 12 / 2.5;

create table ta(a text, b integer, c float);

select 'insert declared types == value types';
insert into ta(a,b,c) values('a', 1, 2.0);

select 'insert declared types != value types text';
insert into ta(a,b,c) values('b', '1', '2.0');

select 'insert declared types != value types';
insert into ta(a,b,c) values('c', 1.0, 2);

select 'update declared types == value types';
update ta set a = 'a' ,b = 1, c = 2.0 where a = 'a';

select 'update declared types != value types text';
update ta set a = 'a' ,b = '1', c = '2.0' where a = 'a';

select 'update declared types != value types';
update ta set a = 'a' ,b = 1.0, c = 2 where a = 'a';

select 'update one value declared types != value types';
update ta set b = 1.0 where a = 'a';
====

Ouptut:
====
sqlite3 < test-affinity.sql 
23 % 3|2
FP Remainder received non integer values 3.000000 :: 12.300000
12.3 % 3|0.0
FP Remainder received non integer values 2.500000 :: 12.000000
12 % 2.5|0.0
23 / 3|7
FP Division received non integer values 3.000000 :: 12.300000
12.3 / 3|4.1
FP Division received non integer values 2.500000 :: 12.000000
12 / 2.5|4.8
insert declared types == value types
insert declared types != value types text
Affinity applied on make record 1 : 1 : D
Affinity applied on make record 2 : 1 : E
insert declared types != value types
Affinity applied on make record 1 : 2 : D
update declared types == value types
update declared types != value types text
Affinity applied on make record 1 : 1 : D
Affinity applied on make record 2 : 1 : E
update declared types != value types
Affinity applied on make record 1 : 2 : D
update one value declared types != value types
Affinity applied on make record 1 : 2 : D
====
11:54 Reply: Fail to calculate long expression (artifact: 197b3e0631 user: mingodad)
After this post I looked at how I could minimally enable warning/error messages on some of the problems that using mixed data types can lead to unexpected results and come with this small changes to "src/vdbe.c" that can be activated when defining SQLITE_PEDANTIC macro.

====
-static void applyAffinity(
+static int applyAffinity(
   Mem *pRec,          /* The value to apply affinity to */
   char affinity,      /* The affinity to be applied */
   u8 enc              /* Use this text encoding */
 ){
+  int rc = 0;
   if( affinity>=SQLITE_AFF_NUMERIC ){
     assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
              || affinity==SQLITE_AFF_NUMERIC );
     if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/
       if( (pRec->flags & MEM_Real)==0 ){
-        if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
+        if( pRec->flags & MEM_Str ) {applyNumericAffinity(pRec,1); rc = 1;}
       }else{
-        sqlite3VdbeIntegerAffinity(pRec);
+        sqlite3VdbeIntegerAffinity(pRec); rc = 2;
       }
     }
   }else if( affinity==SQLITE_AFF_TEXT ){
     /* Only attempt the conversion to TEXT if there is an integer or real
     ** representation (blob and NULL do not get converted) but no string
    ** representation.  It would be harmless to repeat the conversion if
     ** there is already a string rep, but it is pointless to waste those
     ** CPU cycles. */
     if( 0==(pRec->flags&MEM_Str) ){ /*OPTIMIZATION-IF-FALSE*/
       if( (pRec->flags&(MEM_Real|MEM_Int|MEM_IntReal)) ){
         testcase( pRec->flags & MEM_Int );
         testcase( pRec->flags & MEM_Real );
         testcase( pRec->flags & MEM_IntReal );
-        sqlite3VdbeMemStringify(pRec, enc, 1);
+        sqlite3VdbeMemStringify(pRec, enc, 1); rc = 2;
       }
     }
     pRec->flags &= ~(MEM_Real|MEM_Int|MEM_IntReal);
   }
+  return rc;
 }
 
 ...
 
  case OP_Add:                   /* same as TK_PLUS, in1, in2, out3 */
 case OP_Subtract:              /* same as TK_MINUS, in1, in2, out3 */
@@ -1699,16 +1701,24 @@
     switch( pOp->opcode ){
       case OP_Add:         rB += rA;       break;
       case OP_Subtract:    rB -= rA;       break;
       case OP_Multiply:    rB *= rA;       break;
       case OP_Divide: {
+#ifdef SQLITE_PEDANTIC
+    if( ((type1 | type2) & MEM_Int)!=0 )
+        fprintf(stderr, "FP Division received non integer values %f :: %f\n", rA, rB);
+#endif
         /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
         if( rA==(double)0 ) goto arithmetic_result_is_null;
         rB /= rA;
         break;
       }
       default: {
+#ifdef SQLITE_PEDANTIC
+    if( ((type1 | type2) & MEM_Int)!=0 )
+        fprintf(stderr, "FP Remainder received non integer values %f :: %f\n", rA, rB);
+#endif
         iA = sqlite3VdbeIntValue(pIn1);
         iB = sqlite3VdbeIntValue(pIn2);
         if( iA==0 ) goto arithmetic_result_is_null;
         if( iA==-1 ) iA = 1;
         rB = (double)(iB % iA);
@@ -1838,11 +1848,11 @@
   break;
 }

 ...
 
        **
       ** Although sqlite3VdbeSerialGet() may read at most 8 bytes from the
       ** buffer passed to it, debugging function VdbeMemPrettyPrint() may
       ** read more.  Use the global constant sqlite3CtypeMap[] as the array,
       ** as that array is 256 bytes long (plenty for VdbeMemPrettyPrint())
@@ -2958,22 +2968,25 @@
   char *zAffinity;       /* The affinity string for the record */
   int file_format;       /* File format to use for encoding */
   u32 len;               /* Length of a field */
   u8 *zHdr;              /* Where to write next byte of the header */
   u8 *zPayload;          /* Where to write next byte of the payload */
+#ifdef SQLITE_PEDANTIC
+  int rc_affinity;
+#endif
 
   /* Assuming the record contains N fields, the record format looks
   ** like this:
   **
   ** ------------------------------------------------------------------------
  ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |
   ** ------------------------------------------------------------------------
   **
   ** Data(0) is taken from register P1.  Data(1) comes from register P1+1
   ** and so forth.
   **
-  ** Each type field is a varint representing the serial type of the 
+  ** Each type field is a varint representing the serial type of the
   ** corresponding data element (see sqlite3VdbeSerialType()). The
   ** hdr-size field is also a varint which is the offset from the beginning
   ** of the record to data0.
   */
   nData = 0;         /* Number of bytes of data space */
@@ -2996,11 +3009,18 @@
   */
   assert( pData0<=pLast );
   if( zAffinity ){
     pRec = pData0;
     do{
+#ifdef SQLITE_PEDANTIC
+    rc_affinity =
+#endif
       applyAffinity(pRec, zAffinity[0], encoding);
+#ifdef SQLITE_PEDANTIC
+    if(rc_affinity && !((rc_affinity == 2) && (zAffinity[0] == SQLITE_AFF_REAL)))
+        fprintf(stderr, "Affinity applied on make record %d : %d : %c\n", (int)(pRec-pData0), rc_affinity, zAffinity[0]);
+#endif
       if( zAffinity[0]==SQLITE_AFF_REAL && (pRec->flags & MEM_Int) ){
         pRec->flags |= MEM_IntReal;
         pRec->flags &= ~(MEM_Int);
       }
       REGISTER_TRACE((int)(pRec-aMem), pRec);
@@ -3160,11 +3180,11 @@
     nHdr += nVarint;
     if( nVarint<sqlite3VarintLen(nHdr) ) nHdr++;
   }
   nByte = nHdr+nData;
====

And here is a simple test:
====
select "23 % 3", 23 % 3;
select "12.3 % 3", 12.3 % 3;
select "12 % 2.5", 12 % 2.5;

select "23 / 3", 23 / 3;
select "12.3 / 3", 12.3 / 3;
select "12 / 2.5", 12 / 2.5;

create table ta(a text, b integer, c float);

select 'insert declared types == value types';
insert into ta(a,b,c) values('a', 1, 2.0);

select 'insert declared types != value types text';
insert into ta(a,b,c) values('b', '1', '2.0');

select 'insert declared types != value types';
insert into ta(a,b,c) values('c', 1.0, 2);

select 'update declared types == value types';
update ta set a = 'a' ,b = 1, c = 2.0 where a = 'a';

select 'update declared types != value types text';
update ta set a = 'a' ,b = '1', c = '2.0' where a = 'a';

select 'update declared types != value types';
update ta set a = 'a' ,b = 1.0, c = 2 where a = 'a';

select 'update one value declared types != value types';
update ta set b = 1.0 where a = 'a';
====

Ouptut:
====
sqlite3 < test-affinity.sql 
23 % 3|2
FP Remainder received non integer values 3.000000 :: 12.300000
12.3 % 3|0.0
FP Remainder received non integer values 2.500000 :: 12.000000
12 % 2.5|0.0
23 / 3|7
FP Division received non integer values 3.000000 :: 12.300000
12.3 / 3|4.1
FP Division received non integer values 2.500000 :: 12.000000
12 / 2.5|4.8
insert declared types == value types
insert declared types != value types text
Affinity applied on make record 1 : 1 : D
Affinity applied on make record 2 : 1 : E
insert declared types != value types
Affinity applied on make record 1 : 2 : D
update declared types == value types
update declared types != value types text
Affinity applied on make record 1 : 1 : D
Affinity applied on make record 2 : 1 : E
update declared types != value types
Affinity applied on make record 1 : 2 : D
update one value declared types != value types
Affinity applied on make record 1 : 2 : D
====
2021-08-07
10:24 Reply: Fail to calculate long expression (artifact: 637c28c63d user: mingodad)
And here is a bunch of different ways calculating the same expressions to show how type declaration influence calculation:

=====
select "-- literal expression, integer values types rounded to floor";
select (((((((788)*(8))))+8342*1-1))*4186*(15))*(((22%284/((7530/((2)*(((((25))-421))))))*597%2663)+7283-9+167%((3))))+(8871) as expr;
select (((((((788)*(8))))+8342*1-1))*4186*(15))*(((22/((7530/((2)*(((((25))-421))))))*597)+7283-9+167))+(8871) as expr;

select "-- literal expression, integer values types rounded to ceil";
select (((((((788)*(9))))+8342*2-1))*4187*(15))*(((22%284/((7530/((2)*(((((25))-421))))))*597%2663)+7284-10+168%((3))))+(8871) as expr;
select (((((((788)*(9))))+8342*2-1))*4187*(15))*(((22/((7530/((2)*(((((25))-421))))))*597)+7284-10+168))+(8871) as expr;

select "-- literal expression, mixed values types";
select (((((((788)*(8.46))))+8342*1.803-1))*4186.4*(15))*(((22%284/((7530/((2)*(((((25))-421))))))*597%2663)+7283.8-9.60+167.8644%((3))))+(8871) as expr;
select (((((((788)*(8.46))))+8342*1.803-1))*4186.4*(15))*(((22/((7530/((2)*(((((25))-421))))))*597)+7283.8-9.60+167.8644))+(8871) as expr;

select "-- json array expression, mixed values types";
select ( (((((((json_extract(js.js, "$[0]"))*(json_extract(js.js, "$[1]")))))+json_extract(js.js, "$[2]")*json_extract(js.js, "$[3]")-json_extract(js.js, "$[4]")))*json_extract(js.js, "$[5]")*(json_extract(js.js, "$[6]")))*(((json_extract(js.js, "$[7]")%json_extract(js.js, "$[8]")/((json_extract(js.js, "$[9]")/((json_extract(js.js, "$[10]"))*(((((json_extract(js.js, "$[11]")))-json_extract(js.js, "$[12]")))))))*json_extract(js.js, "$[13]")%json_extract(js.js, "$[14]"))+json_extract(js.js, "$[15]")-json_extract(js.js, "$[16]")+json_extract(js.js, "$[17]")%((json_extract(js.js, "$[18]")))))+(json_extract(js.js, "$[19]")) ) as expr
from (select "[788, 8.46, 8342, 1.803, 1, 4186.4, 15, 22, 284, 7530, 2, 25, 421, 597, 2663, 7283.8, 9.60, 167.8644, 3, 8871]" as js) as js;
select (((((((json_extract(js.js, "$[0]"))*(json_extract(js.js, "$[1]")))))+json_extract(js.js, "$[2]")*json_extract(js.js, "$[3]")-json_extract(js.js, "$[4]")))*json_extract(js.js, "$[5]")*(json_extract(js.js, "$[6]")))*(((json_extract(js.js, "$[7]")/((json_extract(js.js, "$[9]")/((json_extract(js.js, "$[10]"))*(((((json_extract(js.js, "$[11]")))-json_extract(js.js, "$[12]")))))))*json_extract(js.js, "$[13]"))+json_extract(js.js, "$[15]")-json_extract(js.js, "$[16]")+json_extract(js.js, "$[17]")))+(json_extract(js.js, "$[19]")) as expr
from (select "[788, 8.46, 8342, 1.803, 1, 4186.4, 15, 22, 284, 7530, 2, 25, 421, 597, 2663, 7283.8, 9.60, 167.8644, 3, 8871]" as js) as js;

select "-- json object expression, mixed values types";
select ( (((((((json_extract(js.js, "$.a"))*(json_extract(js.js, "$.b")))))+json_extract(js.js, "$.c")*json_extract(js.js, "$.d")-json_extract(js.js, "$.e")))*json_extract(js.js, "$.f")*(json_extract(js.js, "$.g")))*(((json_extract(js.js, "$.h")%json_extract(js.js, "$.i")/((json_extract(js.js, "$.j")/((json_extract(js.js, "$.k"))*(((((json_extract(js.js, "$.l")))-json_extract(js.js, "$.m")))))))*json_extract(js.js, "$.n")%json_extract(js.js, "$.o"))+json_extract(js.js, "$.p")-json_extract(js.js, "$.q")+json_extract(js.js, "$.r")%((json_extract(js.js, "$.s")))))+(json_extract(js.js, "$.t")) ) as expr
from (select '{"a":788, "b":8.46, "c":8342, "d":1.803, "e":1, "f":4186.4, "g":15, "h":22, "i":284, "j":7530, "k":2, "l":25, "m":421, "n":597, "o":2663, "p":7283.8, "q":9.60, "r":167.8644, "s":3, "t":8871}' as js) as js;
select ( (((((((json_extract(js.js, "$.a"))*(json_extract(js.js, "$.b")))))+json_extract(js.js, "$.c")*json_extract(js.js, "$.d")-json_extract(js.js, "$.e")))*json_extract(js.js, "$.f")*(json_extract(js.js, "$.g")))*(((json_extract(js.js, "$.h")/((json_extract(js.js, "$.j")/((json_extract(js.js, "$.k"))*(((((json_extract(js.js, "$.l")))-json_extract(js.js, "$.m")))))))*json_extract(js.js, "$.n"))+json_extract(js.js, "$.p")-json_extract(js.js, "$.q")+json_extract(js.js, "$.r")))+(json_extract(js.js, "$.t")) ) as expr
from (select '{"a":788, "b":8.46, "c":8342, "d":1.803, "e":1, "f":4186.4, "g":15, "h":22, "i":284, "j":7530, "k":2, "l":25, "m":421, "n":597, "o":2663, "p":7283.8, "q":9.60, "r":167.8644, "s":3, "t":8871}' as js) as js;

select "-- json object expression, text/mixed values types";
select ( (((((((json_extract(js.js, "$.a"))*(json_extract(js.js, "$.b")))))+json_extract(js.js, "$.c")*json_extract(js.js, "$.d")-json_extract(js.js, "$.e")))*json_extract(js.js, "$.f")*(json_extract(js.js, "$.g")))*(((json_extract(js.js, "$.h")%json_extract(js.js, "$.i")/((json_extract(js.js, "$.j")/((json_extract(js.js, "$.k"))*(((((json_extract(js.js, "$.l")))-json_extract(js.js, "$.m")))))))*json_extract(js.js, "$.n")%json_extract(js.js, "$.o"))+json_extract(js.js, "$.p")-json_extract(js.js, "$.q")+json_extract(js.js, "$.r")%((json_extract(js.js, "$.s")))))+(json_extract(js.js, "$.t")) ) as expr
from (select '{"a":"788", "b":"8.46", "c":"8342", "d":"1.803", "e":"1", "f":"4186.4", "g":"15", "h":"22", "i":"284", "j":"7530", "k":"2", "l":"25", "m":"421", "n":"597", "o":"2663", "p":"7283.8", "q":"9.60", "r":"167.8644", "s":"3", "t":"8871"}' as js) as js;
select ( (((((((json_extract(js.js, "$.a"))*(json_extract(js.js, "$.b")))))+json_extract(js.js, "$.c")*json_extract(js.js, "$.d")-json_extract(js.js, "$.e")))*json_extract(js.js, "$.f")*(json_extract(js.js, "$.g")))*(((json_extract(js.js, "$.h")/((json_extract(js.js, "$.j")/((json_extract(js.js, "$.k"))*(((((json_extract(js.js, "$.l")))-json_extract(js.js, "$.m")))))))*json_extract(js.js, "$.n"))+json_extract(js.js, "$.p")-json_extract(js.js, "$.q")+json_extract(js.js, "$.r")))+(json_extract(js.js, "$.t")) ) as expr
from (select '{"a":"788", "b":"8.46", "c":"8342", "d":"1.803", "e":"1", "f":"4186.4", "g":"15", "h":"22", "i":"284", "j":"7530", "k":"2", "l":"25", "m":"421", "n":"597", "o":"2663", "p":"7283.8", "q":"9.60", "r":"167.8644", "s":"3", "t":"8871"}' as js) as js;

select "-- no type declaration, mixed values";
create table ta(id integer primary key, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
insert into ta(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788, 8.46, 8342, 1.803, 1, 4186.4, 15, 22, 284, 7530, 2, 25, 421, 597, 2663, 7283.8, 9.60, 167.8644, 3, 8871);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from ta;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from ta;

select "-- text type declaration, mixed values";
create table tb(id integer primary key, a text, b text, c text, d text, e text, f text, g text, h text, i text, j text, k text, l text, m text, n text, o text, p text, q text, r text, s text, t text);
insert into tb(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788, 8.46, 8342, 1.803, 1, 4186.4, 15, 22, 284, 7530, 2, 25, 421, 597, 2663, 7283.8, 9.60, 167.8644, 3, 8871);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from tb;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from tb;

select "-- text type declaration, text/mixed values";
create table tbt(id integer primary key, a text, b text, c text, d text, e text, f text, g text, h text, i text, j text, k text, l text, m text, n text, o text, p text, q text, r text, s text, t text);
insert into tbt(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values('788', '8.46', '8342', '1.803', '1', '4186.4', '15', '22', '284', '7530', '2', '25', '421', '597', '2663', '7283.8', '9.60', '167.8644', '3', '8871');
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from tbt;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from tbt;

select "-- blob type declaration, mixed values";
create table tl(id integer primary key, a blob, b blob, c blob, d blob, e blob, f blob, g blob, h blob, i blob, j blob, k blob, l blob, m blob, n blob, o blob, p blob, q blob, r blob, s blob, t blob);
insert into tl(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788, 8.46, 8342, 1.803, 1, 4186.4, 15, 22, 284, 7530, 2, 25, 421, 597, 2663, 7283.8, 9.60, 167.8644, 3, 8871);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from tl;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from tl;

select "-- integer type declaration, mixed values";
create table tc(id integer primary key, a integer, b integer, c integer, d integer, e integer, f integer, g integer, h integer, i integer, j integer, k integer, l integer, m integer, n integer, o integer, p integer, q integer, r integer, s integer, t integer);
insert into tc(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788, 8.46, 8342, 1.803, 1, 4186.4, 15, 22, 284, 7530, 2, 25, 421, 597, 2663, 7283.8, 9.60, 167.8644, 3, 8871);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from tc;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from tc;

select "-- integer/real type declaration, integer/real values";
create table te(id integer primary key, a integer, b float, c integer, d float, e integer, f float, g integer, h integer, i integer, j integer, k integer, l integer, m integer, n integer, o integer, p float, q float, r float, s integer, t integer);
insert into te(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788, 8.46, 8342, 1.803, 1, 4186.4, 15, 22, 284, 7530, 2, 25, 421, 597, 2663, 7283.8, 9.60, 167.8644, 3, 8871);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from te;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from te;

select "-- integer type declaration, real values";
create table tf(id integer primary key, a integer, b integer, c integer, d integer, e integer, f integer, g integer, h integer, i integer, j integer, k integer, l integer, m integer, n integer, o integer, p integer, q integer, r integer, s integer, t integer);
insert into tf(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788.0, 8.46, 8342.0, 1.803, 1.0, 4186.4, 15.0, 22.0, 284.0, 7530.0, 2.0, 25.0, 421.0, 597.0, 2663.0, 7283.8, 9.60, 167.8644, 3.0, 8871.0);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from tf;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from tf;

select "-- literal expression, real values types";
select (((((((788.0)*(8.46))))+8342*1.803-1.0))*4186.4*(15.0))*(((22.0%284.0/((7530.0/((2.0)*(((((25.0))-421.0))))))*597.0%2663.0)+7283.8-9.60+167.8644%((3.0))))+(8871.0) as expr;
select (((((((788.0)*(8.46))))+8342*1.803-1.0))*4186.4*(15.0))*(((22.0/((7530.0/((2.0)*(((((25.0))-421.0))))))*597.0)+7283.8-9.60+167.8644))+(8871.0) as expr;

select "-- real type declaration, mixed values";
create table td(id integer primary key, a real, b real, c real, d real, e real, f real, g real, h real, i real, j real, k real, l real, m real, n real, o real, p real, q real, r real, s real, t real);
insert into td(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788, 8.46, 8342, 1.803, 1, 4186.4, 15, 22, 284, 7530, 2, 25, 421, 597, 2663, 7283.8, 9.60, 167.8644, 3, 8871);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from td;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from td;

select "-- real type declaration, real values";
create table td2(id integer primary key, a real, b real, c real, d real, e real, f real, g real, h real, i real, j real, k real, l real, m real, n real, o real, p real, q real, r real, s real, t real);
insert into td2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788.0, 8.46, 8342.0, 1.803, 1.0, 4186.4, 15.0, 22.0, 284.0, 7530.0, 2.0, 25.0, 421.0, 597.0, 2663.0, 7283.8, 9.60, 167.8644, 3.0, 8871.0);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from td2;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from td2;

select "-- blob type declaration, real values";
create table tg(id integer primary key, a blob, b blob, c blob, d blob, e blob, f blob, g blob, h blob, i blob, j blob, k blob, l blob, m blob, n blob, o blob, p blob, q blob, r blob, s blob, t blob);
insert into tg(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values(788.0, 8.46, 8342.0, 1.803, 1.0, 4186.4, 15.0, 22.0, 284.0, 7530.0, 2.0, 25.0, 421.0, 597.0, 2663.0, 7283.8, 9.60, 167.8644, 3.0, 8871.0);
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from tg;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from tg;

select "-- text type declaration, text/real values";
create table tbtf(id integer primary key, a text, b text, c text, d text, e text, f text, g text, h text, i text, j text, k text, l text, m text, n text, o text, p text, q text, r text, s text, t text);
insert into tbtf(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
values('788.0', '8.46', '8342', '1.803', '1.0', '4186.4', '15.0', '22.0', '284.0', '7530.0', '2.0', '25.0', '421.0', '597.0', '2663.0', '7283.8', '9.60', '167.8644', '3.0', '8871.0');
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h%i/((j/((k)*(((((l))-m))))))*n%o)+p-q+r%((s))))+(t) as expr from tbtf;
select (((((((a)*(b))))+c*d-e))*f*(g))*(((h/((j/((k)*(((((l))-m))))))*n)+p-q+r))+(t) as expr from tbtf;

select "-- json array expression, real values types";
select ( (((((((json_extract(js.js, "$[0]"))*(json_extract(js.js, "$[1]")))))+json_extract(js.js, "$[2]")*json_extract(js.js, "$[3]")-json_extract(js.js, "$[4]")))*json_extract(js.js, "$[5]")*(json_extract(js.js, "$[6]")))*(((json_extract(js.js, "$[7]")%json_extract(js.js, "$[8]")/((json_extract(js.js, "$[9]")/((json_extract(js.js, "$[10]"))*(((((json_extract(js.js, "$[11]")))-json_extract(js.js, "$[12]")))))))*json_extract(js.js, "$[13]")%json_extract(js.js, "$[14]"))+json_extract(js.js, "$[15]")-json_extract(js.js, "$[16]")+json_extract(js.js, "$[17]")%((json_extract(js.js, "$[18]")))))+(json_extract(js.js, "$[19]")) ) as expr
from (select "[788.0, 8.46, 8342.0, 1.803, 1.0, 4186.4, 15.0, 22.0, 284.0, 7530.0, 2.0, 25.0, 421.0, 597.0, 2663.0, 7283.8, 9.60, 167.8644, 3.0, 8871.0]" as js) as js;
select (((((((json_extract(js.js, "$[0]"))*(json_extract(js.js, "$[1]")))))+json_extract(js.js, "$[2]")*json_extract(js.js, "$[3]")-json_extract(js.js, "$[4]")))*json_extract(js.js, "$[5]")*(json_extract(js.js, "$[6]")))*(((json_extract(js.js, "$[7]")/((json_extract(js.js, "$[9]")/((json_extract(js.js, "$[10]"))*(((((json_extract(js.js, "$[11]")))-json_extract(js.js, "$[12]")))))))*json_extract(js.js, "$[13]"))+json_extract(js.js, "$[15]")-json_extract(js.js, "$[16]")+json_extract(js.js, "$[17]")))+(json_extract(js.js, "$[19]")) as expr
from (select "[788.0, 8.46, 8342.0, 1.803, 1.0, 4186.4, 15.0, 22.0, 284.0, 7530.0, 2.0, 25.0, 421.0, 597.0, 2663.0, 7283.8, 9.60, 167.8644, 3.0, 8871.0]" as js) as js;

select "-- json object expression, real values types";
select ( (((((((json_extract(js.js, "$.a"))*(json_extract(js.js, "$.b")))))+json_extract(js.js, "$.c")*json_extract(js.js, "$.d")-json_extract(js.js, "$.e")))*json_extract(js.js, "$.f")*(json_extract(js.js, "$.g")))*(((json_extract(js.js, "$.h")%json_extract(js.js, "$.i")/((json_extract(js.js, "$.j")/((json_extract(js.js, "$.k"))*(((((json_extract(js.js, "$.l")))-json_extract(js.js, "$.m")))))))*json_extract(js.js, "$.n")%json_extract(js.js, "$.o"))+json_extract(js.js, "$.p")-json_extract(js.js, "$.q")+json_extract(js.js, "$.r")%((json_extract(js.js, "$.s")))))+(json_extract(js.js, "$.t")) ) as expr
from (select '{"a":788.0, "b":8.46, "c":8342.0, "d":1.803, "e":1.0, "f":4186.4, "g":15.0, "h":22.0, "i":284.0, "j":7530.0, "k":2.0, "l":25.0, "m":421.0, "n":597.0, "o":2663.0, "p":7283.8, "q":9.60, "r":167.8644, "s":3.0, "t":8871.0}' as js) as js;
select ( (((((((json_extract(js.js, "$.a"))*(json_extract(js.js, "$.b")))))+json_extract(js.js, "$.c")*json_extract(js.js, "$.d")-json_extract(js.js, "$.e")))*json_extract(js.js, "$.f")*(json_extract(js.js, "$.g")))*(((json_extract(js.js, "$.h")/((json_extract(js.js, "$.j")/((json_extract(js.js, "$.k"))*(((((json_extract(js.js, "$.l")))-json_extract(js.js, "$.m")))))))*json_extract(js.js, "$.n"))+json_extract(js.js, "$.p")-json_extract(js.js, "$.q")+json_extract(js.js, "$.r")))+(json_extract(js.js, "$.t")) ) as expr
from (select '{"a":788.0, "b":8.46, "c":8342.0, "d":1.803, "e":1.0, "f":4186.4, "g":15.0, "h":22.0, "i":284.0, "j":7530.0, "k":2.0, "l":25.0, "m":421.0, "n":597.0, "o":2663.0, "p":7283.8, "q":9.60, "r":167.8644, "s":3.0, "t":8871.0}' as js) as js;

select "-- json object expression, text/real values types";
select ( (((((((json_extract(js.js, "$.a"))*(json_extract(js.js, "$.b")))))+json_extract(js.js, "$.c")*json_extract(js.js, "$.d")-json_extract(js.js, "$.e")))*json_extract(js.js, "$.f")*(json_extract(js.js, "$.g")))*(((json_extract(js.js, "$.h")%json_extract(js.js, "$.i")/((json_extract(js.js, "$.j")/((json_extract(js.js, "$.k"))*(((((json_extract(js.js, "$.l")))-json_extract(js.js, "$.m")))))))*json_extract(js.js, "$.n")%json_extract(js.js, "$.o"))+json_extract(js.js, "$.p")-json_extract(js.js, "$.q")+json_extract(js.js, "$.r")%((json_extract(js.js, "$.s")))))+(json_extract(js.js, "$.t")) ) as expr
from (select '{"a":"788.0", "b":"8.46", "c":"8342.0", "d":"1.803", "e":"1.0", "f":"4186.4", "g":"15.0", "h":"22.0", "i":"284.0", "j":"7530.0", "k":"2.0", "l":"25.0", "m":"421.0", "n":"597.0", "o":"2663.0", "p":"7283.8", "q":"9.60", "r":"167.8644", "s":"3.0", "t":"8871.0"}' as js) as js;
select ( (((((((json_extract(js.js, "$.a"))*(json_extract(js.js, "$.b")))))+json_extract(js.js, "$.c")*json_extract(js.js, "$.d")-json_extract(js.js, "$.e")))*json_extract(js.js, "$.f")*(json_extract(js.js, "$.g")))*(((json_extract(js.js, "$.h")/((json_extract(js.js, "$.j")/((json_extract(js.js, "$.k"))*(((((json_extract(js.js, "$.l")))-json_extract(js.js, "$.m")))))))*json_extract(js.js, "$.n"))+json_extract(js.js, "$.p")-json_extract(js.js, "$.q")+json_extract(js.js, "$.r")))+(json_extract(js.js, "$.t")) ) as expr
from (select '{"a":"788.0", "b":"8.46", "c":"8342.0", "d":"1.803", "e":"1.0", "f":"4186.4", "g":"15.0", "h":"22.0", "i":"284.0", "j":"7530.0", "k":"2.0", "l":"25.0", "m":"421.0", "n":"597.0", "o":"2663.0", "p":"7283.8", "q":"9.60", "r":"167.8644", "s":"3.0", "t":"8871.0"}' as js) as js;
=====
2021-08-06
13:31 Reply: Fail to calculate long expression (artifact: 8713cc0f32 user: mingodad)
And after removing all modulo operations:
====

EXPR = (((((((788)*(8.46))))+8342*1.803-1))*4186.4*(15))*(((22/((7530/((2)*(((((25))-421))))))*597)+7283.8-9.60+167))+(8871)

SQUILU = 8515287402650.3

SQLITE = 8515287402650.34

POSTGRESQL = 8515287402650.347200

D = 8.51529e+12

JAVA = 8.515287402650345E12

MYSQL = 8259816920501.086

JAVASCRIPT = 8259816920615.111

PHP = 8259816920615.1

LUA = 8259816920615.1

AMPL = 8.25982e+12

GAMS = 8.25982E+12

RUBY = 7701542593121.873

PYTHON = 7.70154259312e+12

====
12:09 Reply: Fail to calculate long expression (artifact: 6885cf9e21 user: mingodad)
And making all operands to modulo operator "%" integer:
=====
EXPR = (((((((788)*(8.46))))+8342*1.803-1))*4186.4*(15))*(((22%284/((7530/((2)*(((((25))-421))))))*597%2663)+7283.8-9.60+167%((3))))+(8871)

D = 8.29038e+12
JAVA = 8.290383058308305E12
MYSQL = 8034912576159.046
POSTGRESQL = 8290383058308.307200
SQLITE = 8290383058308.3
SQUILU = 8291561284461.3
JAVASCRIPT = 8034912576273.071
PHP = 8035491468054

AMPL = 8.03491e+12
GAMS = 8.03491E+12

PYTHON = 1.11064580608e+13
RUBY = 11106458060797.121

LUA = 11664732388290
====
11:45 Edit reply: Fail to calculate long expression (artifact: e47c300b49 user: mingodad)
And this expression shows that we have several disagreements between programming languages about what is the end result (including SQLite):

=====
EXPR = (((((((788)*(8.46))))+8342*1.803-1))*4186.4*(15))*(((22%284/((7530/((2)*(((((25))-421))))))*597%2663)+7283.8-9.60+167.8644%((3))))+(8871)

POSTGRESQL = 8291561284461.33301440
SQUILU = 8291561284461.3
JAVA = 8.291561284461331E12
D = 8.29156e+12

SQLITE = 8290383058308.3

PHP = 8035491468054
JAVSCRIPT = 8036090802426.098
MYSQL = 8036090802312.071
AMPL = 8.03609e+12
GAMS = 8.03609E+12

PYTHON = 1.1107636287e+13
RUBY = 11107636286950.146

LUA = 11665910614443

=====
11:15 Reply: Fail to calculate long expression (artifact: 9b07b2e333 user: mingodad)
And this expression shows that we have several disagreements between programming languages about what is the end result (including SQLite):

=====
EXPR = (((((((788)*(8.46))))+8342*1.803-1))*4186.4*(15))*(((22%284/((7530/((2)*(((((25))-421))))))*597%2663)+7283.8-9.60+167.8644%((3))))+(8871)

POSTGRESQL = 8291561284461.33301440
SQUILU = 8291561284461.3
JAVA = 8.291561284461331E12
D = 8.29156e+12

SQLITE = 8290383058308.3

PHP = 8035491468054
JAVSCRIPT = 8036090802426.098
MYSQL = 8036090802312.071

PYTHON = 1.1107636287e+13
RUBY = 11107636286950.146

LUA = 11665910614443

=====
10:55 Reply: Fail to calculate long expression (artifact: 29ffb80d31 user: mingodad)
SQLite also fail to compile this long expression with "Error: near line 1: parser stack overflow".

Lua/Javascript/MYSQL gives 11.9393973

PHP/PostgreSQL/Python/Ruby/Java/D give NAN or division by ZERO

=====
select ( (3.55-180.890/(((35)%5/913.17+((((50.59*(40.904)%9.30+((812%4))*(147*(400)/6+((40.8))+((7.90+(((834)/510%6))+5.600-30.70/7/8*630-((((600%652.62)*(((8)))))*7.20/(700.30%804-1-((608))+54/(402)))-3%1.98))*69.1/(92.4)*(400)-900*850/21*(7.308)%(((((((700)))+((2)-93.30/329-(50)*((703.5))*255.702))))-((10.804)))%95.50+(100.208)*((((141.9-90)))))%(((((((80.705*(((153)))+7/550*((((604)))/75.80%(9.600)*(380.53)-10.90-50%(43)))))))))*(((((((1+(20.7/(5.85/100.7*((6.2)*(95+20-(6)*6*870.7))+57/(64.70)-(44.5-7.50%((90.551)+((((6)))))/(80))%400-20.10)/828+6/80*10+((200))/((808.1-503-((100.904%920.900)))%1/(((((32.867*407.2))))))%(17)/((293.760)))-((2+((64*500)*44.78/(500-838))*((70.38)/120.98)+(1.19+(((200.6-307.900+4/((((2.800)))))%(969.404)*28/903.558-(((60.24)%((1-((14)))+((((8.70*6/560%(9)*290.10-9+73)/113+80+(909)))))))*((960.500)-8.500*((804.905)%3+60+((((((((208))))-560.730))))/(((((1%60.5/(3))))-120.45/8.620/30/((50)/50.30%24%((5.41))%((2.98)/(20.10))*(((((((50)))/(21))))-((510.3%600.330/7))+((10-(((660%670)-100%3-(203.16))))*(((((800))))))-4-20.133))))%(72))-((((((509.90)/(((309.402))%82.90-940.6*((770))))))))*20.700%(610.1)*(90.6)*31-10)))/((3.841))*80/100.50%2+(9+15.5)+(57.30*5)-(((((((2)))-(((10.411)-(1)/(3)))))*((505.409+(6.3)+(20.60+1.702-3.82/20/80.807%6.7+230.1+7.70/300*300.680/64.9%(602)*72.326+((((((((810.307-(((((52%90.187*20%710+300%907.1))))%19)-((((((1-92.30))-3)-46))%4/109)*6.601-(12)+337.87-(2.7)*288.860/((1.300)+70.86-40)*((((51.85+((70.35/60-98.80))%(600)))))+(4.30)-((((((366))))))*2/8/(70)+570.90)))))))*800.2)%(66*10)/184/240.1/(3.20))/500.406*((5))))))/((6.2*45.800)/62/(9.890)))/(80.3)%503)))%(((500)))))%1.40/((50*100.98)*610+3.100)*(404)-(890.60%830)*4.200%(500)-19.310+(10.2))*(44%(((((((221*(((((5.40/8)%(400-8.60)*(80.5)*(((((5.3))))))))*(59%16/((5))*9.2%((((620*((((80.5)-2)))%(52.402)))*(50)))+(((3.80)))-((600.3)))*309.405)))%(40)/502.590-(850)*41.2*1%92.60)%775+((((639.255))))/(600)-3%70*(805.109)*(404/9.9*304.20)+(((9.5%191/209.10/56.100+(((2.77)/80.82*3.8*740*((14*(45)-972+(50*((((((1.8)))+780.20/(70%900/((300-(((((378))+607.6)*(7.7)/14.40+(706.805%(902.8+(176.60+(637))+(((19.20/7.86-5.894%70%(((800.7)-(373%(903)*(680.120/500+(12.740)/(400)+((307.600+62+1.6*97.62*540.570))*(9)%(((1))-(802-3.19))/50%100.4+(1.240%91.9)+240.208)))-(600)%1.4+((27-566/7.4+208/(8)*10/200+51*((330.190)/800/48.719)*5.90*((9)%3.4+618/(((434.680))+9/853.6)%41/(((100*20/((((((2))))/70%(((47/61.200*32.60))+9.96)-((2.7*630.90*((1.40)*(9.1-900.36))%330.203*(465.574))))-(((39%60.27+2/1%5%((30.530)/94*9/541%895.21%((1%90.9%(30)-(((8.80)))%109*110.30*101.30)-300-900%605/((9.14))-(((3.6)))-9/(701.5*20.8*5.30-400/((801.306/706.82-600.40*63/((((((5.730)*(7.40)))))+36)))+((32/12+(((920))/((84.80)%1)*((((((5%(2)%(378)/10*640/(399.39+(700.207))%8.50-(54*4.90%2.58/(5.70*(((((((6.30%(96.100+(((202.2))))))%(((1.60-(590))*6.200))))*8.12)))%((9/64))%1*(4)*(2.4)%(60.306)-(209.70)-((((60-((7/(3.3)))%15)))))%58/349+4.191*490.609-(245.856)*((((((9)%87%(10.50))))/(99.19)/105.90))*(97.6)/10+190.60+600/3*(((((((((((780))%((40.6/7*(((2.750)))))%310.3+(1))%((300.5-440+((((((589.1%(102)/((42)+(((749)*(26.3%(8)-536/(200.24*3)%((80.700))))*(31.9)+(500)*(14%6/((((958.9)))-((60.6-(80.33)-(50.800)))%((2)*((9))/(76.9)))/3)+((((9)%(387))))))*(((6))-80.4-((410)-((570.37)))*6.2+3%(((48)))-8*(460+(710.810-78.300%92*214+400.363)/952)/90.12-((498.60*(427.8)))/50.60%90.58-304)+403*((((260))))-(((707*((72-91))%((400)*1.50)))-8)-60.5-460.70%42%7-((359*111.702%(282*640.7)-36.450/(12)+(60.1)-50.8/(((650)))+77.7+6.506*55%103.10+(2))*(660.11)*((67.12)*90.7+(9)-73+((2.110))+278.607-(30.23*((((705-8/60+((((50.80)+305.8*(508.3)/50.562%(((70.2*42.5%60.202%7.3)))/((700.904/((620))+((707.20)))+900*(3.560)))%82.4-500.51%300.6/((4*(160)-(((8))-(998)-70)/6%50)/11.97%((3.69)*9)-((((836.2/500.4)))))+303.5))%75.8+34.400/3.870*(4.85%7%5.3%4.40-(400%2-(((9)/((((((10+((6.1))))))))%(((26%(401)*(((((((70.9)))+(70))+501%4+68.203*79-370.923/313.9%(362.3+608/4.606)*((200.1)%38.50*612.4*2.1-165)+623.30/(770%90))))*(((40/42.800)*780-690.40-3.404*3.3))+(((506.4)*7.5))%92.8)))+6.38))*540-(603)%105+273+600-100.6+200.1-52)-4*93.5)-230.1*44+2))*500.70%5/15.6)%58.570))*96)+6/1.900-4)/90.70+400.60-8.9+23.8%20.909/498.87)))))/400.2)/896-591.86)))))))))+479.108)%500)-6.34-204)-127.94%5.81/8)))*22)%730.5))+73.900)/904)-807+61.400)+4.90/32.8-80.62))%30.30))-5.310-2.87)+407))/1.24))-64*60.7)*14.400)*10.5-103.727-30)%450.77+190.7%3.4)-444.1%9+437.4))+8)-404+90-5*902%6)))*100.203))*301.615)-7.9)*20))-3.2)-12.29)))+800.40/602.9-22-39)-7/5.390)/200))+409)/37.75-70*5.801))))))-493/86))%10.800)))*60.80)+8.460)))+9 ) as expr;

=====
2021-08-04
15:09 Reply: Whole grammar railroad diagram (artifact: e07cd11544 user: mingodad)
And here I manually converted the SQL-2016 grammar to generate the railroad diagram https://github.com/JakeWheat/sql-overview/issues/6
2021-08-03
08:29 Reply: Fail to calculate long expression (artifact: c5b028a14b user: mingodad)
So here is the languages I tested so far:

PostgreSQL, MYSQL, Lua, Python, Ruby, Javascript, D: Output 25.133
SQLite: Output NULL
GCC, CLANG, RUST, DAFNY, GO: Output error at compile time
PHP: Output error at runtime
2021-08-02
16:17 Post: Fail to calculate long expression (artifact: 19e5196546 user: mingodad)
After playing a bit with https://baturin.org/tools/bnfgen/ and creating a simplified text generator for a simple expression grammar I've got a long expression that PostgreSQL, Lua, Ruby, Python and Javascript can calculate but sqlite can't:

=====
select ( ((50.266))/2%((2816.31)/(996.7/8175.445-59.546)/((47))*((((93.614))+(((8*(19.6093/28))))))/(79.577-(178/82.7%(2020.26)-271.497%(7.495)*22.42/(892.4036)+((22)+(51.50-(((35%6062-25)-4.264))+5508/409.98)+(((((327.5845/(5296))-(6290.8)))%4+13.719)+146))*((((8877.8)+(5160)%3760-7058)%((62))))%93/(90.24%((993))+(9427)%303.97%(((((8))))/(((699))*(((25/1379.1))%9257.3-(5464+(30)-(7/((9.8))/3.655%9.3)))))-(27)%168-86-((((5.7326)))-((3412+(((11.8717))))*(75)+(899.1)*((541.7/595.1086+22.855+(9.8034+9.412)-(((7+322.7)))-7426*((18)-3782.5*67.144-2+((3.8)%((377)*8)/((56.9)))))))/((21)*664%(57.6974+9139.586+(((((336.4626))))+(((60-((((956)+(4.870+((5418))*(6/57)*(((1.4547+((457.1461)/((3066.6)*7156.5)+(3632)*((47.2*748%(((50.7320))))/(84.90))-6712.4084+(((2)))-69.11+(841+(22.6/925))%((492.43)*468)%93*(751)-(6%(12)%(((937.3850))*((11*((((6.410%7872))))*((5.1563/(7558%(8.16)+370+((((9064.16+4601%934.7722)%34.3146*2716.7-(42*((((21.67/(1115.3)%((68/((50.2))+(1.839*7))))))+639.1))/((8398.1)))%3222.93))%4655.2-28.19%((5896.9237%2/9987.49/((1*5)-(685)-2)%6-1+30.5884*839)))))%766%9681.9688*292.40+958.57*173%1426.305*(5.6*((8959)%57)*66/(((2.135))))*(((2661*43.8865+6.2-(5.87))))*(99.4726*23.254)+1+(((((1048/(60.87+(17)-8729)))/((8975))-762-855)))/(((((8168.14-82+(((10)*(((2762.1006))*(9094.95))-(733.7+(((694.5*83)-((85))*((7.2925)))))*30-((138))%330)))))))))-(((6082))+((6796))/85%1)))*(250))))/((3587.722)*(8-(16))-(503.2186)-((1))-((75.1284))%9984.3663*((875.1*43))-((((1)-28/((((9219.5261)))-3/111.874-((14.3*((566.57)+(932.3314))))*(63.8342)+568.681%(6)%(913)+(((156.28)+(9.7-(487.60))))%5514.738)%906.80))/3182+2.732-3307.9)*54%152-(((416.67-(22.7231)-5.2649)))*2))+8.1831+40.7/(99)-((((((((299.78/5.2*(3061.5-8451-((253.405+1-8.9*(((863.2/3202))-(4393*(44.1))/(8490)/(2-(22.535)*(((3.89)+4340.7750)))%6.2/204)/6653.5745/88+(3.8124)%952+(970.4977)%6438.6868/((9669.987)-15.8964)/(((7257)%(422.6)*(7.84-(2499.786))%(1)/9734.918%18/((((71)/(9606.6))%(7423/389.9548*(((3.98+3.3/((((((349)))))))%65)))))%(5402.73)*9.51*158.9-(524.26)%(3144)/(((1.300+4606+1.16/(6)))%(6.871+(2204))))-(2.7)%3014)))+8)+(6663)))%608.3)/4.404-(99)*520-568.526%5.9%11.811%61+(24)-((15+(25)-(5)*831+(((732)))%(9.226))*(851)/1.3%(1000*((449.360)+5055)-(332))-(396)-((310.809)))+(((7)-((50.9)/4325))-(38)+((297)+(5*9)/(8741-(((((27)-8843.11*(6/(((((908.3612))))+7-7+29)/3437.6*5166))-13.226)))/((((((21.5))))*(949.1150)%(((617%29%(((((1.5)/4560-7294/3078.7819*81+((7730))%1995/77.1%1156.44)-((4037*(1197.8/38.732)/(405.24+((479.1714%308.82)%2622.3+((7383.2244))-20.36*(6.31)%3336/9-4.643+5.909/66*(61.97)*6*(665.78)))*((9)))))/(6533)))*(13.9065)/38+(21))))-8.37-67.63))))+((((7)))*3150)*((812.7*((1.6*((64)))))+7656.380)%((((79.5592/(591))%(57%((48.8)-22/6.8))-7.444)%636%6/((6.68)*1)-(7.626/58.87)*(96%(8795*5585.1%7+1627.6/(6224)+6547%817*((3))/(((681.55)-494*(3.39)))*60)))))+9.26-(((54)))%((43.7689)/(6.4))/6103.18)-((9))/651.6%845.26))))-(5)+1%65/84.495+72.23-((((((634.1878)-293.77)+4))))/((67)))-411*(600))))-(2635))+370)))%(((4690.6))*((((3153.925%(832)))))/722+4830.750))*8564%9%(((88.6362*7924*(((((3727.652)))-79.9))/26)*67.360%(9888))))*53%(2203.7535)/7266+62.18/5.1894)-((((((7))%(((645.7678))))))*74))-4.51-460.4*825.986*5179.936-(9)*166*(927.8/90.45)-(56.1352)%567.47+((((10.4043*((31.7)+225.62-((3.8891*(1.4))))-8+((8532.7+(293.1/53.38/((1.1))+511.93+((93))-97%2035+3+(((3853.25)))+1000%(((((8.948)))*((1799.8993))-6.889*((((28.1))%1.3%17.1242-1846.940/4-(70)/((2.6%(((5.248)%(7841)))+1673%(5)%((((((1265)))*(814.7882)%7/1391+(33.875)/((7.5)))/92.96%(((533.1%(3035)/(((((4.6*(5832)+(72)-69.53*1)%((8))-((4))/64)))*95.46)-(335*4))))*(650))+(6)*70.520%6085.6723)-(61.91)/34-267*(45.3948-((8.2)))-(1/((10-243.770%262.83))%2.60%(55%6))%((745.82+((61.21)-27)-(52.2704)%8041-(((6)))%(7.181+9179)/25+143))+13+(96.297/84.21*((6879.4925)))%21%93.155+341.1+1230+(4)*(1.29)%((5829.8+(4)*4659.98*37))+(((7)))+6318.468*932/((75.8))/694+(3)%((19.9)/43/1846.887+3.5-(99.70)*4406+3615%(888.58+14/(7762%138.3/5642))/40.5-819-(73.2184)*(29.404-((3+5.129))%2489)%4874+5)-(1252)+(796.6401)-7.7461%((((127.3)))-7207+825.80)+((3756))%8770.816-((2.1911%4536.4))*(62.681)%9687.8*923.246+(94.834)-1164%(9)/(75.59)))%((960.4786)-4577.41)%9741.4/(4)-578.66-511/2+90.120))*345.3344+((4769.7))))%151))))))+98-32.1677-547/8)*5)-417%(962.3)/557.431%275+90)%(((2174.78)))-232-1-((233.40)%(4502)%(((7)))/415)) ) as expr;
=====

SQLite output:
=====

=====

PostgreSQL and Lua, Ruby, Javascript and Python:
=====
25.133
=====

Here is a simplified C generator:
=====
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

static int xrandom(int low, int up) {
	double r = (double)rand() * (1.0 / ((double)RAND_MAX + 1.0));
	r *= (double)(up - low) + 1.0;
	return ((int)r + low);
}


void expr_nzdigit() {
	switch(xrandom(1,9)) {
		case 1: printf("1"); break;
		case 2: printf("2"); break;
		case 3: printf("3"); break;
		case 4: printf("4"); break;
		case 5: printf("5"); break;
		case 6: printf("6"); break;
		case 7: printf("7"); break;
		case 8: printf("8"); break;
		case 9: printf("9"); break;
	}
}

void expr_digit() {
	switch(xrandom(0,9)) {
		case 0: printf("0"); break;
		case 1: printf("1"); break;
		case 2: printf("2"); break;
		case 3: printf("3"); break;
		case 4: printf("4"); break;
		case 5: printf("5"); break;
		case 6: printf("6"); break;
		case 7: printf("7"); break;
		case 8: printf("8"); break;
		case 9: printf("9"); break;
	}
}

void expr_integer() {
	expr_nzdigit();
	int imax = xrandom(0,3);
	for(int i=0; i < imax; ++i) expr_digit();
}

void expr_float() {
	expr_integer();
	printf(".");
	expr_integer();
}

void expr_number() {
	switch(xrandom(0,1)) {
		case 0: expr_integer(); break;
		case 1: expr_float(); break;
	}
}

void expr_operations() {
	switch(xrandom(0,4)) {
		case 0: printf("+"); break;
		case 1: printf("-"); break;
		case 2: printf("*"); break;
		case 3: printf("/"); break;
		case 4: printf("%%"); break;
	}
}

void expr_expr() {
	switch(xrandom(0,2)) {
		case 0: expr_expr(); expr_operations(); expr_expr(); break;
		case 1: printf("("); expr_expr(); printf(")"); break;
		case 2: expr_number(); break;
	}
}

void expr_start() {
	srand(clock());
	expr_expr();
	printf("\n");
}

int main(int argc, char *argv[]) {
	expr_start();
	return 0;
}
=====

For this grammar:
=====
<start> ::= <expr> ;

<expr> ::=
	<expr> <operations> <expr>
	| "(" <expr> ")"
	| <number>
	;

<operations> ::=
	"+" | "-" | "*" | "/" | "%"
	;

<nzdigit> ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
<digit> ::= "0" | <nzdigit> ;

<integer> ::= <nzdigit> <digit>{1, 3};
<float> ::= <nzdigit>{1, 3} "." <digit>{1, 3};
<number> ::= <integer> | <float>;
=====
10:00 Reply: Whole grammar railroad diagram (artifact: 34919cc80a user: mingodad)
Related with the grammar there is a tool to generate random text for testing purposes and I've got an initial working "BNF" for sqlite expressions here https://github.com/dmbaturin/bnfgen/issues/2 if you are interested and could help improve it you are welcome.
2021-07-29
17:42 Reply: documenting SQLite's "IS" behavior (artifact: 2de694d9d6 user: mingodad)
Thank you for your persistence on clarify operators precedence/associativity in sqlite !

And it seems to me that some of the examples that you are giving should be considered a bug, like the plus unary for strings, and the boolean confusion.

select +'hi';
hi
2021-07-28
12:24 Reply: Whole grammar railroad diagram (artifact: 65b5eec4ad user: mingodad)
And here there is a railroad diagram for a manually converted sql-2003 grammar:

https://github.com/ronsavage/SQL/issues/5#issuecomment-888264796
2021-07-24
16:25 Reply: Whole grammar railroad diagram (artifact: 5306637cfd user: mingodad)
And here is the railroad diagram for Alasql https://github.com/agershun/alasql/issues/1359 that somehow has a similarity in spirit to https://github.com/facebookincubator/CG-SQL
2021-07-17
13:59 Reply: cycle detection in CHECK constraint with recursive CTE (artifact: 2fb5a45b26 user: mingodad)
Here is stackoverflow question that seems to refer to your problem https://stackoverflow.com/questions/39555616/detect-cycles-using-sql
13:55 Reply: cycle detection in CHECK constraint with recursive CTE (artifact: ae41419f9b user: mingodad)
You are right !
What about a trigger on insert/update ?
08:51 Reply: cycle detection in CHECK constraint with recursive CTE (artifact: 5797b67db2 user: mingodad)
I think you can use "CHECK" for that:

CREATE TABLE IF NOT EXISTS "tag_parents" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"from_tag_id" integer NOT NULL REFERENCES "tag" ("id") DEFERRABLE INITIALLY DEFERRED,
"to_tag_id" integer NOT NULL REFERENCES "tag" ("id") DEFERRABLE INITIALLY DEFERRED CHECK(from_tag_id <> to_tag_id)
);
2021-07-16
11:50 Reply: Whole grammar railroad diagram (artifact: ae56be81ee user: mingodad)
And here is a manual conversion from an old GOLD parser grammar for TSQL https://github.com/karlatgit/tsql-grammar/issues/1
09:04 Reply: Whole grammar railroad diagram (artifact: eb514e05be user: mingodad)
I also just created the railroad diagram for the FIREBIRD database you can see/get it here https://github.com/FirebirdSQL/firebird/issues/6898
2021-07-11
11:34 Edit reply: Can this SQL be simplified? (artifact: 2f89b04f4c user: mingodad)
You are right !

And I pointed out because other people can see your/our examples and use it in other contexts where paginating using offset for big tables is not a good/wise idea.
11:32 Reply: Can this SQL be simplified? (artifact: f95fc2665b user: mingodad)
You are right !

And I pointed out because other people can see your example and use it in other contexts where paginating using offset for big tables is not a good/wise idea.
08:22 Reply: Can this SQL be simplified? (artifact: 1d423484ae user: mingodad)
It's a clean query but has the disadvantage of scan all rows of T2.
2021-07-10
18:23 Reply: Can this SQL be simplified? (artifact: 35c999666b user: mingodad)
The above was based on just discovered https://extendsclass.com/postgresql-online.html

With this sql:
====
create table T1(id integer primary key, val text);
insert into T1(id, val) values(1, '1one'), (2, '1two'), (3, '1three');

create table T2(id integer primary key, val text);
insert into T2(id, val) values(1, '2one'), (2, '2two'), (3, '2three'), (4, '2four');

select id, t2_cnt.cnt, max_t1.cnt
from T2,
    (select count(*) as cnt from T2) t2_cnt,
    (select count(*) as cnt from T1) max_t1
order by id
limit case when t2_cnt.cnt > max_t1.cnt
    then t2_cnt.cnt - max_t1.cnt
    else 0 end;
====
18:19 Reply: Can this SQL be simplified? (artifact: 799a40d760 user: mingodad)
You seems to be right, my bad !

Trying in Postgresql gives a better error message:
====
argument of LIMIT must not contain variables
====
17:38 Reply: Can this SQL be simplified? (artifact: 9a67c943f6 user: mingodad)
Not sure I understand this syntax:

    (select count(*) cnt from T2) t2_cnt,
    (select maxrows from T1) max_t1

Yes it's defining new tables it's a shortcut for:

    (select count(*) as cnt from T2) as t2_cnt,
    (select maxrows from T1) as max_t1
17:26 Reply: Can this SQL be simplified? (artifact: ada2df549f user: mingodad)
It seems that you just found a bug in sqlite !

====
create table T1(id integer primary key, val text);
insert into T1(val) values('1one'), ('1two'), ('1three');

create table T2(id integer primary key, val text);
insert into T2(val) values('2one'), ('2two'), ('2three'), ('2four');

select id, t2_cnt.cnt, max_t1.cnt
from T2,
    (select count(*) as cnt from T2) t2_cnt,
    (select count(*) as cnt from T1) max_t1
order by id

limit case when t2_cnt.cnt > max_t1.cnt
    then t2_cnt.cnt - max_t1.cnt
    else 0 end;
====
Ouput:
====
sqlite3 < "test.sql"
Error: near line 7: no such column: t2_cnt.cnt
====

Removing the "limit":
====
create table T1(id integer primary key, val text);
insert into T1(val) values('1one'), ('1two'), ('1three');

create table T2(id integer primary key, val text);
insert into T2(val) values('2one'), ('2two'), ('2three'), ('2four');

select id, t2_cnt.cnt, max_t1.cnt
from T2,
    (select count(*) as cnt from T2) t2_cnt,
    (select count(*) as cnt from T1) max_t1
order by id;
====
Ouput:
====
sqlite3 < "test.sql"
1|4|3
2|4|3
3|4|3
4|4|3
====
12:19 Reply: Can this SQL be simplified? (artifact: 511652494c user: mingodad)
It seems better/simpler than mine !
12:13 Reply: Can this SQL be simplified? (artifact: 79e6d39f14 user: mingodad)
Hello Tim !

select id
from T2,
    (select count(*) cnt from T2) t2_cnt,
    (select maxrows from T1) max_t1
order by mydate
limit case when t2_cnt.cnt > max_t1.maxrows
    then t2_cnt.cnt - max_t1.maxrows
    else 0 end;
 
Cheers !
2021-07-03
18:28 Edit reply: Lemon SQL output omition (artifact: bf6a9dc7b5 user: mingodad)
Meanwhile this alternative query seems to do the job:

====
select name || ' ::=' || group_concat(
	case when hasOr == 1 then ' (' || trim(rtxt) || ')'
	else
		case when length(rtxt) == 0 then ' /* empty */' else rtxt end
	end, '
	|')
from (
	select lhs, name, substr(txt, instr(txt, tbl.sep) + length(tbl.sep)) rtxt, (instr(txt, '|') > 0) hasOr
	from rule left join symbol on lhs=id, (select '::=' as sep) tbl
) as t
group by lhs;
====

Partial output:
====
input ::= cmdlist
cmdlist ::= cmdlist ecmd
	| ecmd
ecmd ::= SEMI
	| cmdx SEMI
	| explain cmdx SEMI
cmdx ::= cmd
explain ::= EXPLAIN
	| EXPLAIN QUERY PLAN
cmd ::= BEGIN transtype trans_opt
	| (COMMIT|END trans_opt)
	| ROLLBACK trans_opt
	| SAVEPOINT nm
====
18:14 Reply: Lemon SQL output omition (artifact: 8581daa1e1 user: mingodad)
Meanwhile this alternative query seems to do the job:

====
select name || ' ::=' || group_concat(case when hasOr == 1 then '(' || rtxt || ')' else rtxt end, '
	|')
from (
	select lhs, name, substr(txt, instr(txt, tbl.sep) + length(tbl.sep)) rtxt, (instr(txt, '|') > 0) hasOr
	from rule left join symbol on lhs=id, (select '::=' as sep) tbl
) as t
group by lhs;
====

Partial output:
====
input ::= cmdlist
cmdlist ::= cmdlist ecmd
	| ecmd
ecmd ::= SEMI
	| cmdx SEMI
	| explain cmdx SEMI
cmdx ::= cmd
explain ::= EXPLAIN
	| EXPLAIN QUERY PLAN
cmd ::= BEGIN transtype trans_opt
	|( COMMIT|END trans_opt)
	| ROLLBACK trans_opt
	| SAVEPOINT nm
====
16:53 Post: Lemon SQL output omition (artifact: 293042459d user: mingodad)
Looking at using the sql output of lemon to generate the railroad diagram from the parser I noticed that lemon is omitting info from the rhs side of rules that have '|' like this rule from sqlite3/src/parse.y:

====
cmd ::= COMMIT|END(X) trans_opt. 
====

The lemon SQL output:
====
INSERT INTO rule(ruleid,lhs,txt)VALUES(8,189,'cmd ::= COMMIT|END trans_opt');
INSERT INTO rulerhs(ruleid,pos,sym)VALUES(8,0,10);
-- here somehow the '|' should be present
INSERT INTO rulerhs(ruleid,pos,sym)VALUES(8,0,11);
INSERT INTO rulerhs(ruleid,pos,sym)VALUES(8,1,191);
====

I noticed it when trying this query over the lemon SQL output for sqlite3/src/parse.y:

====
select name || ' ::= ' || group_concat(rhs, '
	|')
from (
	select id, name, group_concat(ifnull(rhs_name, '/* empty */'), ' ') as rhs
	from (
		select symbol.id, symbol.name, rule.ruleid, rulerhs.pos, rulerhs.sym, s2.name as rhs_name
		from symbol
			left join rule on symbol.id=rule.lhs
			left join rulerhs on rule.ruleid=rulerhs.ruleid
			left join symbol as s2 on rulerhs.sym=s2.id
		where symbol.isTerminal=0
		order by symbol.id, rule.ruleid, rulerhs.pos
	) as tbl
	group by id, ruleid
) as tbl2
group by id
====

Partial query output:
====
input ::= cmdlist
cmdlist ::= cmdlist ecmd
	|ecmd
ecmd ::= SEMI
	|cmdx SEMI
	|explain cmdx SEMI
cmdx ::= cmd
explain ::= EXPLAIN
	|EXPLAIN QUERY PLAN
cmd ::= BEGIN transtype trans_opt
	|COMMIT END trans_opt //!! here the '|' is missing
	|ROLLBACK trans_opt
	|SAVEPOINT nm
====
2021-07-02
10:08 Reply: Whole grammar railroad diagram (artifact: b35d9145ac user: mingodad)
And also I did the same for percona server but they have not enabled issues on their repository (where I normally post) so here it is for sqlite users to make comparison:

EBNF for https://www.bottlecaps.de/rr/ui :
====
/*
From https://raw.githubusercontent.com/percona/percona-server/8.0/sql/sql_yacc.yy
*/

start_entry ::= sql_statement | GRAMMAR_SELECTOR_EXPR bit_expr END_OF_INPUT | GRAMMAR_SELECTOR_PART partition_clause END_OF_INPUT | GRAMMAR_SELECTOR_GCOL IDENT_sys '(' expr ')' END_OF_INPUT | GRAMMAR_SELECTOR_CTE table_subquery END_OF_INPUT | GRAMMAR_SELECTOR_DERIVED_EXPR expr END_OF_INPUT
sql_statement ::= END_OF_INPUT | simple_statement_or_begin ';' opt_end_of_input | simple_statement_or_begin END_OF_INPUT
opt_end_of_input ::= /*empty*/ | END_OF_INPUT
simple_statement_or_begin ::= simple_statement | begin_stmt
simple_statement ::= alter_database_stmt | alter_event_stmt | alter_function_stmt | alter_instance_stmt | alter_logfile_stmt | alter_procedure_stmt | alter_resource_group_stmt | alter_server_stmt | alter_tablespace_stmt | alter_undo_tablespace_stmt | alter_table_stmt | alter_user_stmt | alter_view_stmt | analyze_table_stmt | binlog_base64_event | call_stmt | change | check_table_stmt | checksum | clone_stmt | commit | create | create_index_stmt | create_resource_group_stmt | create_role_stmt | create_srs_stmt | create_table_stmt | deallocate | delete_stmt | describe_stmt | do_stmt | drop_database_stmt | drop_event_stmt | drop_function_stmt | drop_index_stmt | drop_logfile_stmt | drop_procedure_stmt | drop_resource_group_stmt | drop_role_stmt | drop_server_stmt | drop_srs_stmt | drop_tablespace_stmt | drop_undo_tablespace_stmt | drop_table_stmt | drop_trigger_stmt | drop_user_stmt | drop_view_stmt | execute | explain_stmt | flush | get_diagnostics | group_replication | grant | handler_stmt | help | import_stmt | insert_stmt | install | kill | load_stmt | lock | optimize_table_stmt | keycache_stmt | preload_stmt | prepare | purge | release | rename | repair_table_stmt | replace_stmt | reset | resignal_stmt | restart_server_stmt | revoke | rollback | savepoint | select_stmt | set | set_resource_group_stmt | set_role_stmt | show_binary_logs_stmt | show_binlog_events_stmt | show_character_set_stmt | show_collation_stmt | show_columns_stmt | show_count_errors_stmt | show_count_warnings_stmt | show_create_database_stmt | show_create_event_stmt | show_create_function_stmt | show_create_procedure_stmt | show_create_table_stmt | show_create_trigger_stmt | show_create_user_stmt | show_create_view_stmt | show_databases_stmt | show_engine_logs_stmt | show_engine_mutex_stmt | show_engine_status_stmt | show_engines_stmt | show_errors_stmt | show_events_stmt | show_function_code_stmt | show_function_status_stmt | show_grants_stmt | show_keys_stmt | show_master_status_stmt | show_open_tables_stmt | show_plugins_stmt | show_privileges_stmt | show_procedure_code_stmt | show_procedure_status_stmt | show_processlist_stmt | show_profile_stmt | show_profiles_stmt | show_relaylog_events_stmt | show_replica_status_stmt | show_replicas_stmt | show_stats_stmt | show_status_stmt | show_table_status_stmt | show_tables_stmt | show_triggers_stmt | show_variables_stmt | show_warnings_stmt | shutdown_stmt | signal_stmt | start | start_replica_stmt | stop_replica_stmt | truncate_stmt | uninstall | unlock | update_stmt | use | xa
deallocate ::= deallocate_or_drop PREPARE_SYM ident
deallocate_or_drop ::= DEALLOCATE_SYM | DROP
prepare ::= PREPARE_SYM ident FROM prepare_src
prepare_src ::= TEXT_STRING_sys | '@' ident_or_text
execute ::= EXECUTE_SYM ident execute_using
execute_using ::= /*empty*/ | USING execute_var_list
execute_var_list ::= execute_var_list ',' execute_var_ident | execute_var_ident
execute_var_ident ::= '@' ident_or_text
help ::= HELP_SYM ident_or_text
change_replication_source ::= MASTER_SYM | REPLICATION SOURCE_SYM
change ::= CHANGE change_replication_source TO_SYM source_defs opt_channel | CHANGE REPLICATION FILTER_SYM filter_defs opt_channel
filter_defs ::= filter_def | filter_defs ',' filter_def
filter_def ::= REPLICATE_DO_DB EQ opt_filter_db_list | REPLICATE_IGNORE_DB EQ opt_filter_db_list | REPLICATE_DO_TABLE EQ opt_filter_table_list | REPLICATE_IGNORE_TABLE EQ opt_filter_table_list | REPLICATE_WILD_DO_TABLE EQ opt_filter_string_list | REPLICATE_WILD_IGNORE_TABLE EQ opt_filter_string_list | REPLICATE_REWRITE_DB EQ opt_filter_db_pair_list
opt_filter_db_list ::= '(' ')' | '(' filter_db_list ')'
filter_db_list ::= filter_db_ident | filter_db_list ',' filter_db_ident
filter_db_ident ::= ident
opt_filter_db_pair_list ::= '(' ')' | '(' filter_db_pair_list ')'
filter_db_pair_list ::= '(' filter_db_ident ',' filter_db_ident ')' | filter_db_pair_list ',' '(' filter_db_ident ',' filter_db_ident ')'
opt_filter_table_list ::= '(' ')' | '(' filter_table_list ')'
filter_table_list ::= filter_table_ident | filter_table_list ',' filter_table_ident
filter_table_ident ::= schema '.' ident
opt_filter_string_list ::= '(' ')' | '(' filter_string_list ')'
filter_string_list ::= filter_string | filter_string_list ',' filter_string
filter_string ::= filter_wild_db_table_string
source_defs ::= source_def | source_defs ',' source_def
change_replication_source_auto_position ::= MASTER_AUTO_POSITION_SYM | SOURCE_AUTO_POSITION_SYM
change_replication_source_host ::= MASTER_HOST_SYM | SOURCE_HOST_SYM
change_replication_source_bind ::= MASTER_BIND_SYM | SOURCE_BIND_SYM
change_replication_source_user ::= MASTER_USER_SYM | SOURCE_USER_SYM
change_replication_source_password ::= MASTER_PASSWORD_SYM | SOURCE_PASSWORD_SYM
change_replication_source_port ::= MASTER_PORT_SYM | SOURCE_PORT_SYM
change_replication_source_connect_retry ::= MASTER_CONNECT_RETRY_SYM | SOURCE_CONNECT_RETRY_SYM
change_replication_source_retry_count ::= MASTER_RETRY_COUNT_SYM | SOURCE_RETRY_COUNT_SYM
change_replication_source_delay ::= MASTER_DELAY_SYM | SOURCE_DELAY_SYM
change_replication_source_ssl ::= MASTER_SSL_SYM | SOURCE_SSL_SYM
change_replication_source_ssl_ca ::= MASTER_SSL_CA_SYM | SOURCE_SSL_CA_SYM
change_replication_source_ssl_capath ::= MASTER_SSL_CAPATH_SYM | SOURCE_SSL_CAPATH_SYM
change_replication_source_ssl_cipher ::= MASTER_SSL_CIPHER_SYM | SOURCE_SSL_CIPHER_SYM
change_replication_source_ssl_crl ::= MASTER_SSL_CRL_SYM | SOURCE_SSL_CRL_SYM
change_replication_source_ssl_crlpath ::= MASTER_SSL_CRLPATH_SYM | SOURCE_SSL_CRLPATH_SYM
change_replication_source_ssl_key ::= MASTER_SSL_KEY_SYM | SOURCE_SSL_KEY_SYM
change_replication_source_ssl_verify_server_cert ::= MASTER_SSL_VERIFY_SERVER_CERT_SYM | SOURCE_SSL_VERIFY_SERVER_CERT_SYM
change_replication_source_tls_version ::= MASTER_TLS_VERSION_SYM | SOURCE_TLS_VERSION_SYM
change_replication_source_tls_ciphersuites ::= MASTER_TLS_CIPHERSUITES_SYM | SOURCE_TLS_CIPHERSUITES_SYM
change_replication_source_ssl_cert ::= MASTER_SSL_CERT_SYM | SOURCE_SSL_CERT_SYM
change_replication_source_public_key ::= MASTER_PUBLIC_KEY_PATH_SYM | SOURCE_PUBLIC_KEY_PATH_SYM
change_replication_source_get_source_public_key ::= GET_MASTER_PUBLIC_KEY_SYM | GET_SOURCE_PUBLIC_KEY_SYM
change_replication_source_heartbeat_period ::= MASTER_HEARTBEAT_PERIOD_SYM | SOURCE_HEARTBEAT_PERIOD_SYM
change_replication_source_compression_algorithm ::= MASTER_COMPRESSION_ALGORITHM_SYM | SOURCE_COMPRESSION_ALGORITHM_SYM
change_replication_source_zstd_compression_level ::= MASTER_ZSTD_COMPRESSION_LEVEL_SYM | SOURCE_ZSTD_COMPRESSION_LEVEL_SYM
source_def ::= change_replication_source_host EQ TEXT_STRING_sys_nonewline | NETWORK_NAMESPACE_SYM EQ TEXT_STRING_sys_nonewline | change_replication_source_bind EQ TEXT_STRING_sys_nonewline | change_replication_source_user EQ TEXT_STRING_sys_nonewline | change_replication_source_password EQ TEXT_STRING_sys_nonewline | change_replication_source_port EQ ulong_num | change_replication_source_connect_retry EQ ulong_num | change_replication_source_retry_count EQ ulong_num | change_replication_source_delay EQ ulong_num | change_replication_source_ssl EQ ulong_num | change_replication_source_ssl_ca EQ TEXT_STRING_sys_nonewline | change_replication_source_ssl_capath EQ TEXT_STRING_sys_nonewline | change_replication_source_tls_version EQ TEXT_STRING_sys_nonewline | change_replication_source_tls_ciphersuites EQ source_tls_ciphersuites_def | change_replication_source_ssl_cert EQ TEXT_STRING_sys_nonewline | change_replication_source_ssl_cipher EQ TEXT_STRING_sys_nonewline | change_replication_source_ssl_key EQ TEXT_STRING_sys_nonewline | change_replication_source_ssl_verify_server_cert EQ ulong_num | change_replication_source_ssl_crl EQ TEXT_STRING_sys_nonewline | change_replication_source_ssl_crlpath EQ TEXT_STRING_sys_nonewline | change_replication_source_public_key EQ TEXT_STRING_sys_nonewline | change_replication_source_get_source_public_key EQ ulong_num | change_replication_source_heartbeat_period EQ NUM_literal | IGNORE_SERVER_IDS_SYM EQ '(' ignore_server_id_list ')' | change_replication_source_compression_algorithm EQ TEXT_STRING_sys | change_replication_source_zstd_compression_level EQ ulong_num | change_replication_source_auto_position EQ ulong_num | PRIVILEGE_CHECKS_USER_SYM EQ privilege_check_def | REQUIRE_ROW_FORMAT_SYM EQ ulong_num | REQUIRE_TABLE_PRIMARY_KEY_CHECK_SYM EQ table_primary_key_check_def | SOURCE_CONNECTION_AUTO_FAILOVER_SYM EQ real_ulong_num | ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_SYM EQ assign_gtids_to_anonymous_transactions_def | source_file_def
ignore_server_id_list ::= /*empty*/ | ignore_server_id | ignore_server_id_list ',' ignore_server_id
ignore_server_id ::= ulong_num
privilege_check_def ::= user_ident_or_text | NULL_SYM
table_primary_key_check_def ::= STREAM_SYM | ON_SYM | OFF_SYM
assign_gtids_to_anonymous_transactions_def ::= OFF_SYM | LOCAL_SYM | TEXT_STRING
source_tls_ciphersuites_def ::= TEXT_STRING_sys_nonewline | NULL_SYM
source_log_file ::= MASTER_LOG_FILE_SYM | SOURCE_LOG_FILE_SYM
source_log_pos ::= MASTER_LOG_POS_SYM | SOURCE_LOG_POS_SYM
source_file_def ::= source_log_file EQ TEXT_STRING_sys_nonewline | source_log_pos EQ ulonglong_num | RELAY_LOG_FILE_SYM EQ TEXT_STRING_sys_nonewline | RELAY_LOG_POS_SYM EQ ulong_num
opt_channel ::= | FOR_SYM CHANNEL_SYM TEXT_STRING_sys_nonewline
create_table_stmt ::= CREATE opt_temporary TABLE_SYM opt_if_not_exists table_ident '(' table_element_list ')' opt_create_table_options_etc | CREATE opt_temporary TABLE_SYM opt_if_not_exists table_ident opt_create_table_options_etc | CREATE opt_temporary TABLE_SYM opt_if_not_exists table_ident LIKE table_ident | CREATE opt_temporary TABLE_SYM opt_if_not_exists table_ident '(' LIKE table_ident ')'
create_role_stmt ::= CREATE ROLE_SYM opt_if_not_exists role_list
create_resource_group_stmt ::= CREATE RESOURCE_SYM GROUP_SYM ident TYPE_SYM opt_equal resource_group_types opt_resource_group_vcpu_list opt_resource_group_priority opt_resource_group_enable_disable
create ::= CREATE DATABASE opt_if_not_exists ident opt_create_database_options | CREATE view_or_trigger_or_sp_or_event | CREATE USER opt_if_not_exists create_user_list default_role_clause require_clause connect_options opt_account_lock_password_expire_options opt_user_attribute | CREATE LOGFILE_SYM GROUP_SYM ident ADD lg_undofile opt_logfile_group_options | CREATE TABLESPACE_SYM ident opt_ts_datafile_name opt_logfile_group_name opt_tablespace_options | CREATE UNDO_SYM TABLESPACE_SYM ident ADD ts_datafile opt_undo_tablespace_options | CREATE SERVER_SYM ident_or_text FOREIGN DATA_SYM WRAPPER_SYM ident_or_text OPTIONS_SYM '(' server_options_list ')' | CREATE COMPRESSION_DICTIONARY_SYM opt_if_not_exists ident '(' create_compression_dictionary_allowed_expr ')'
create_srs_stmt ::= CREATE OR_SYM REPLACE_SYM SPATIAL_SYM REFERENCE_SYM SYSTEM_SYM real_ulonglong_num srs_attributes | CREATE SPATIAL_SYM REFERENCE_SYM SYSTEM_SYM opt_if_not_exists real_ulonglong_num srs_attributes
srs_attributes ::= | srs_attributes NAME_SYM TEXT_STRING_sys_nonewline | srs_attributes DEFINITION_SYM TEXT_STRING_sys_nonewline | srs_attributes ORGANIZATION_SYM TEXT_STRING_sys_nonewline IDENTIFIED_SYM BY real_ulonglong_num | srs_attributes DESCRIPTION_SYM TEXT_STRING_sys_nonewline
default_role_clause ::= | DEFAULT_SYM ROLE_SYM role_list
create_index_stmt ::= CREATE opt_unique_combo_clustering INDEX_SYM ident opt_index_type_clause ON_SYM table_ident '(' key_list_with_expression ')' opt_index_options opt_index_lock_and_algorithm | CREATE FULLTEXT_SYM INDEX_SYM ident ON_SYM table_ident '(' key_list_with_expression ')' opt_fulltext_index_options opt_index_lock_and_algorithm | CREATE SPATIAL_SYM INDEX_SYM ident ON_SYM table_ident '(' key_list_with_expression ')' opt_spatial_index_options opt_index_lock_and_algorithm
create_compression_dictionary_allowed_expr ::= text_literal | variable
server_options_list ::= server_option | server_options_list ',' server_option
server_option ::= USER TEXT_STRING_sys | HOST_SYM TEXT_STRING_sys | DATABASE TEXT_STRING_sys | OWNER_SYM TEXT_STRING_sys | PASSWORD TEXT_STRING_sys | SOCKET_SYM TEXT_STRING_sys | PORT_SYM ulong_num
event_tail ::= EVENT_SYM opt_if_not_exists sp_name ON_SYM SCHEDULE_SYM ev_schedule_time opt_ev_on_completion opt_ev_status opt_ev_comment DO_SYM ev_sql_stmt
ev_schedule_time ::= EVERY_SYM expr interval ev_starts ev_ends | AT_SYM expr
opt_ev_status ::= | ENABLE_SYM | DISABLE_SYM ON_SYM SLAVE | DISABLE_SYM
ev_starts ::= | STARTS_SYM expr
ev_ends ::= /*empty*/ | ENDS_SYM expr
opt_ev_on_completion ::= | ev_on_completion
ev_on_completion ::= ON_SYM COMPLETION_SYM PRESERVE_SYM | ON_SYM COMPLETION_SYM NOT_SYM PRESERVE_SYM
opt_ev_comment ::= | COMMENT_SYM TEXT_STRING_sys
ev_sql_stmt ::= ev_sql_stmt_inner
ev_sql_stmt_inner ::= sp_proc_stmt_statement | sp_proc_stmt_return | sp_proc_stmt_if | case_stmt_specification | sp_labeled_block | sp_unlabeled_block | sp_labeled_control | sp_proc_stmt_unlabeled | sp_proc_stmt_leave | sp_proc_stmt_iterate | sp_proc_stmt_open | sp_proc_stmt_fetch | sp_proc_stmt_close
sp_name ::= ident '.' ident | ident
sp_a_chistics ::= | sp_a_chistics sp_chistic
sp_c_chistics ::= | sp_c_chistics sp_c_chistic
sp_chistic ::= COMMENT_SYM TEXT_STRING_sys | LANGUAGE_SYM SQL_SYM | NO_SYM SQL_SYM | CONTAINS_SYM SQL_SYM | READS_SYM SQL_SYM DATA_SYM | MODIFIES_SYM SQL_SYM DATA_SYM | sp_suid
sp_c_chistic ::= sp_chistic | DETERMINISTIC_SYM | not DETERMINISTIC_SYM
sp_suid ::= SQL_SYM SECURITY_SYM DEFINER_SYM | SQL_SYM SECURITY_SYM INVOKER_SYM
call_stmt ::= CALL_SYM sp_name opt_paren_expr_list
opt_paren_expr_list ::= | '(' opt_expr_list ')'
sp_fdparam_list ::= /*empty*/ | sp_fdparams
sp_fdparams ::= sp_fdparams ',' sp_fdparam | sp_fdparam
sp_fdparam ::= ident type opt_collate
sp_pdparam_list ::= /*empty*/ | sp_pdparams
sp_pdparams ::= sp_pdparams ',' sp_pdparam | sp_pdparam
sp_pdparam ::= sp_opt_inout ident type opt_collate
sp_opt_inout ::= | IN_SYM | OUT_SYM | INOUT_SYM
sp_proc_stmts ::= | sp_proc_stmts sp_proc_stmt ';'
sp_proc_stmts1 ::= sp_proc_stmt ';' | sp_proc_stmts1 sp_proc_stmt ';'
sp_decls ::= | sp_decls sp_decl ';'
sp_decl ::= DECLARE_SYM sp_decl_idents type opt_collate sp_opt_default | DECLARE_SYM ident CONDITION_SYM FOR_SYM sp_cond | DECLARE_SYM sp_handler_type HANDLER_SYM FOR_SYM sp_hcond_list sp_proc_stmt | DECLARE_SYM ident CURSOR_SYM FOR_SYM select_stmt
sp_handler_type ::= EXIT_SYM | CONTINUE_SYM
sp_hcond_list ::= sp_hcond_element | sp_hcond_list ',' sp_hcond_element
sp_hcond_element ::= sp_hcond
sp_cond ::= ulong_num | sqlstate
sqlstate ::= SQLSTATE_SYM opt_value TEXT_STRING_literal
opt_value ::= | VALUE_SYM
sp_hcond ::= sp_cond | ident | SQLWARNING_SYM | not FOUND_SYM | SQLEXCEPTION_SYM
signal_stmt ::= SIGNAL_SYM signal_value opt_set_signal_information
signal_value ::= ident | sqlstate
opt_signal_value ::= | signal_value
opt_set_signal_information ::= | SET_SYM signal_information_item_list
signal_information_item_list ::= signal_condition_information_item_name EQ signal_allowed_expr | signal_information_item_list ',' signal_condition_information_item_name EQ signal_allowed_expr
signal_allowed_expr ::= literal_or_null | variable | simple_ident
signal_condition_information_item_name ::= CLASS_ORIGIN_SYM | SUBCLASS_ORIGIN_SYM | CONSTRAINT_CATALOG_SYM | CONSTRAINT_SCHEMA_SYM | CONSTRAINT_NAME_SYM | CATALOG_NAME_SYM | SCHEMA_NAME_SYM | TABLE_NAME_SYM | COLUMN_NAME_SYM | CURSOR_NAME_SYM | MESSAGE_TEXT_SYM | MYSQL_ERRNO_SYM
resignal_stmt ::= RESIGNAL_SYM opt_signal_value opt_set_signal_information
get_diagnostics ::= GET_SYM which_area DIAGNOSTICS_SYM diagnostics_information
which_area ::= | CURRENT_SYM | STACKED_SYM
diagnostics_information ::= statement_information | CONDITION_SYM condition_number condition_information
statement_information ::= statement_information_item | statement_information ',' statement_information_item
statement_information_item ::= simple_target_specification EQ statement_information_item_name
simple_target_specification ::= ident | '@' ident_or_text
statement_information_item_name ::= NUMBER_SYM | ROW_COUNT_SYM
condition_number ::= signal_allowed_expr
condition_information ::= condition_information_item | condition_information ',' condition_information_item
condition_information_item ::= simple_target_specification EQ condition_information_item_name
condition_information_item_name ::= CLASS_ORIGIN_SYM | SUBCLASS_ORIGIN_SYM | CONSTRAINT_CATALOG_SYM | CONSTRAINT_SCHEMA_SYM | CONSTRAINT_NAME_SYM | CATALOG_NAME_SYM | SCHEMA_NAME_SYM | TABLE_NAME_SYM | COLUMN_NAME_SYM | CURSOR_NAME_SYM | MESSAGE_TEXT_SYM | MYSQL_ERRNO_SYM | RETURNED_SQLSTATE_SYM
sp_decl_idents ::= ident | sp_decl_idents ',' ident
sp_opt_default ::= | DEFAULT_SYM expr
sp_proc_stmt ::= sp_proc_stmt_statement | sp_proc_stmt_return | sp_proc_stmt_if | case_stmt_specification | sp_labeled_block | sp_unlabeled_block | sp_labeled_control | sp_proc_stmt_unlabeled | sp_proc_stmt_leave | sp_proc_stmt_iterate | sp_proc_stmt_open | sp_proc_stmt_fetch | sp_proc_stmt_close
sp_proc_stmt_if ::= IF sp_if END IF
sp_proc_stmt_statement ::= simple_statement
sp_proc_stmt_return ::= RETURN_SYM expr
sp_proc_stmt_unlabeled ::= sp_unlabeled_control
sp_proc_stmt_leave ::= LEAVE_SYM label_ident
sp_proc_stmt_iterate ::= ITERATE_SYM label_ident
sp_proc_stmt_open ::= OPEN_SYM ident
sp_proc_stmt_fetch ::= FETCH_SYM sp_opt_fetch_noise ident INTO sp_fetch_list
sp_proc_stmt_close ::= CLOSE_SYM ident
sp_opt_fetch_noise ::= /*empty*/ | NEXT_SYM FROM | FROM
sp_fetch_list ::= ident | sp_fetch_list ',' ident
sp_if ::= expr THEN_SYM sp_proc_stmts1 sp_elseifs
sp_elseifs ::= /*empty*/ | ELSEIF_SYM sp_if | ELSE sp_proc_stmts1
case_stmt_specification ::= simple_case_stmt | searched_case_stmt
simple_case_stmt ::= CASE_SYM expr simple_when_clause_list else_clause_opt END CASE_SYM
searched_case_stmt ::= CASE_SYM searched_when_clause_list else_clause_opt END CASE_SYM
simple_when_clause_list ::= simple_when_clause | simple_when_clause_list simple_when_clause
searched_when_clause_list ::= searched_when_clause | searched_when_clause_list searched_when_clause
simple_when_clause ::= WHEN_SYM expr THEN_SYM sp_proc_stmts1
searched_when_clause ::= WHEN_SYM expr THEN_SYM sp_proc_stmts1
else_clause_opt ::= | ELSE sp_proc_stmts1
sp_labeled_control ::= label_ident ':' sp_unlabeled_control sp_opt_label
sp_opt_label ::= | label_ident
sp_labeled_block ::= label_ident ':' sp_block_content sp_opt_label
sp_unlabeled_block ::= sp_block_content
sp_block_content ::= BEGIN_SYM sp_decls sp_proc_stmts END
sp_unlabeled_control ::= LOOP_SYM sp_proc_stmts1 END LOOP_SYM | WHILE_SYM expr DO_SYM sp_proc_stmts1 END WHILE_SYM | REPEAT_SYM sp_proc_stmts1 UNTIL_SYM expr END REPEAT_SYM
trg_action_time ::= BEFORE_SYM | AFTER_SYM
trg_event ::= INSERT_SYM | UPDATE_SYM | DELETE_SYM
opt_ts_datafile_name ::= | ADD ts_datafile
opt_logfile_group_name ::= | USE_SYM LOGFILE_SYM GROUP_SYM ident
opt_tablespace_options ::= | tablespace_option_list
tablespace_option_list ::= tablespace_option | tablespace_option_list opt_comma tablespace_option
tablespace_option ::= ts_option_initial_size | ts_option_autoextend_size | ts_option_max_size | ts_option_extent_size | ts_option_nodegroup | ts_option_engine | ts_option_wait | ts_option_comment | ts_option_file_block_size | ts_option_encryption | ts_option_encryption_key_id | ts_option_engine_attribute
opt_alter_tablespace_options ::= | alter_tablespace_option_list
alter_tablespace_option_list ::= alter_tablespace_option | alter_tablespace_option_list opt_comma alter_tablespace_option
alter_tablespace_option ::= ts_option_initial_size | ts_option_autoextend_size | ts_option_max_size | ts_option_engine | ts_option_wait | ts_option_encryption | ts_option_encryption_key_id | ts_option_engine_attribute
opt_undo_tablespace_options ::= | undo_tablespace_option_list
undo_tablespace_option_list ::= undo_tablespace_option | undo_tablespace_option_list opt_comma undo_tablespace_option
undo_tablespace_option ::= ts_option_engine
opt_logfile_group_options ::= | logfile_group_option_list
logfile_group_option_list ::= logfile_group_option | logfile_group_option_list opt_comma logfile_group_option
logfile_group_option ::= ts_option_initial_size | ts_option_undo_buffer_size | ts_option_redo_buffer_size | ts_option_nodegroup | ts_option_engine | ts_option_wait | ts_option_comment
opt_alter_logfile_group_options ::= | alter_logfile_group_option_list
alter_logfile_group_option_list ::= alter_logfile_group_option | alter_logfile_group_option_list opt_comma alter_logfile_group_option
alter_logfile_group_option ::= ts_option_initial_size | ts_option_engine | ts_option_wait
ts_datafile ::= DATAFILE_SYM TEXT_STRING_sys
undo_tablespace_state ::= ACTIVE_SYM | INACTIVE_SYM
lg_undofile ::= UNDOFILE_SYM TEXT_STRING_sys
ts_option_initial_size ::= INITIAL_SIZE_SYM opt_equal size_number
ts_option_autoextend_size ::= option_autoextend_size
option_autoextend_size ::= AUTOEXTEND_SIZE_SYM opt_equal size_number
ts_option_max_size ::= MAX_SIZE_SYM opt_equal size_number
ts_option_extent_size ::= EXTENT_SIZE_SYM opt_equal size_number
ts_option_undo_buffer_size ::= UNDO_BUFFER_SIZE_SYM opt_equal size_number
ts_option_redo_buffer_size ::= REDO_BUFFER_SIZE_SYM opt_equal size_number
ts_option_nodegroup ::= NODEGROUP_SYM opt_equal real_ulong_num
ts_option_comment ::= COMMENT_SYM opt_equal TEXT_STRING_sys
ts_option_engine ::= opt_storage ENGINE_SYM opt_equal ident_or_text
ts_option_file_block_size ::= FILE_BLOCK_SIZE_SYM opt_equal size_number
ts_option_wait ::= WAIT_SYM | NO_WAIT_SYM
ts_option_encryption ::= ENCRYPTION_SYM opt_equal TEXT_STRING_sys
ts_option_encryption_key_id ::= ENCRYPTION_KEY_ID_SYM opt_equal real_ulong_num
ts_option_engine_attribute ::= ENGINE_ATTRIBUTE_SYM opt_equal json_attribute
size_number ::= real_ulonglong_num | IDENT_sys
opt_create_table_options_etc ::= create_table_options opt_create_partitioning_etc | opt_create_partitioning_etc
opt_create_partitioning_etc ::= partition_clause opt_duplicate_as_qe | opt_duplicate_as_qe
opt_duplicate_as_qe ::= | duplicate as_create_query_expression | as_create_query_expression
as_create_query_expression ::= AS query_expression_or_parens | query_expression_or_parens
partition_clause ::= PARTITION_SYM BY part_type_def opt_num_parts opt_sub_part opt_part_defs
part_type_def ::= opt_linear KEY_SYM opt_key_algo '(' opt_name_list ')' | opt_linear HASH_SYM '(' bit_expr ')' | RANGE_SYM '(' bit_expr ')' | RANGE_SYM COLUMNS '(' name_list ')' | LIST_SYM '(' bit_expr ')' | LIST_SYM COLUMNS '(' name_list ')'
opt_linear ::= | LINEAR_SYM
opt_key_algo ::= | ALGORITHM_SYM EQ real_ulong_num
opt_num_parts ::= | PARTITIONS_SYM real_ulong_num
opt_sub_part ::= | SUBPARTITION_SYM BY opt_linear HASH_SYM '(' bit_expr ')' opt_num_subparts | SUBPARTITION_SYM BY opt_linear KEY_SYM opt_key_algo '(' name_list ')' opt_num_subparts
opt_name_list ::= | name_list
name_list ::= ident | name_list ',' ident
opt_num_subparts ::= | SUBPARTITIONS_SYM real_ulong_num
opt_part_defs ::= | '(' part_def_list ')'
part_def_list ::= part_definition | part_def_list ',' part_definition
part_definition ::= PARTITION_SYM ident opt_part_values opt_part_options opt_sub_partition
opt_part_values ::= | VALUES LESS_SYM THAN_SYM part_func_max | VALUES IN_SYM part_values_in
part_func_max ::= MAX_VALUE_SYM | part_value_item_list_paren
part_values_in ::= part_value_item_list_paren | '(' part_value_list ')'
part_value_list ::= part_value_item_list_paren | part_value_list ',' part_value_item_list_paren
part_value_item_list_paren ::= '(' part_value_item_list ')'
part_value_item_list ::= part_value_item | part_value_item_list ',' part_value_item
part_value_item ::= MAX_VALUE_SYM | bit_expr
opt_sub_partition ::= | '(' sub_part_list ')'
sub_part_list ::= sub_part_definition | sub_part_list ',' sub_part_definition
sub_part_definition ::= SUBPARTITION_SYM ident_or_text opt_part_options
opt_part_options ::= | part_option_list
part_option_list ::= part_option_list part_option | part_option
part_option ::= TABLESPACE_SYM opt_equal ident | opt_storage ENGINE_SYM opt_equal ident_or_text | NODEGROUP_SYM opt_equal real_ulong_num | MAX_ROWS opt_equal real_ulonglong_num | MIN_ROWS opt_equal real_ulonglong_num | DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys | INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys | COMMENT_SYM opt_equal TEXT_STRING_sys
alter_database_options ::= alter_database_option | alter_database_options alter_database_option
alter_database_option ::= create_database_option | READ_SYM ONLY_SYM opt_equal ternary_option
opt_create_database_options ::= | create_database_options
create_database_options ::= create_database_option | create_database_options create_database_option
create_database_option ::= default_collation | default_charset | default_encryption
opt_if_not_exists ::= | IF not EXISTS
create_table_options_space_separated ::= create_table_option | create_table_options_space_separated create_table_option
create_table_options ::= create_table_option | create_table_options opt_comma create_table_option
opt_comma ::= /*empty*/ | ','
create_table_option ::= ENGINE_SYM opt_equal ident_or_text | SECONDARY_ENGINE_SYM opt_equal NULL_SYM | SECONDARY_ENGINE_SYM opt_equal ident_or_text | MAX_ROWS opt_equal ulonglong_num | MIN_ROWS opt_equal ulonglong_num | AVG_ROW_LENGTH opt_equal ulong_num | PASSWORD opt_equal TEXT_STRING_sys | COMMENT_SYM opt_equal TEXT_STRING_sys | COMPRESSION_SYM opt_equal TEXT_STRING_sys | ENCRYPTION_SYM opt_equal TEXT_STRING_sys | ENCRYPTION_KEY_ID_SYM opt_equal real_ulong_num | AUTO_INC opt_equal ulonglong_num | PACK_KEYS_SYM opt_equal ternary_option | STATS_AUTO_RECALC_SYM opt_equal ternary_option | STATS_PERSISTENT_SYM opt_equal ternary_option | STATS_SAMPLE_PAGES_SYM opt_equal ulong_num | STATS_SAMPLE_PAGES_SYM opt_equal DEFAULT_SYM | CHECKSUM_SYM opt_equal ulong_num | TABLE_CHECKSUM_SYM opt_equal ulong_num | DELAY_KEY_WRITE_SYM opt_equal ulong_num | ROW_FORMAT_SYM opt_equal row_types | UNION_SYM opt_equal '(' opt_table_list ')' | default_charset | default_collation | INSERT_METHOD opt_equal merge_insert_types | DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys | INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys | TABLESPACE_SYM opt_equal ident | STORAGE_SYM DISK_SYM | STORAGE_SYM MEMORY_SYM | CONNECTION_SYM opt_equal TEXT_STRING_sys | KEY_BLOCK_SIZE opt_equal ulong_num | START_SYM TRANSACTION_SYM | ENGINE_ATTRIBUTE_SYM opt_equal json_attribute | SECONDARY_ENGINE_ATTRIBUTE_SYM opt_equal json_attribute | option_autoextend_size
ternary_option ::= ulong_num | DEFAULT_SYM
default_charset ::= opt_default character_set opt_equal charset_name
default_collation ::= opt_default COLLATE_SYM opt_equal collation_name
default_encryption ::= opt_default ENCRYPTION_SYM opt_equal TEXT_STRING_sys
row_types ::= DEFAULT_SYM | FIXED_SYM | DYNAMIC_SYM | COMPRESSED_SYM | REDUNDANT_SYM | COMPACT_SYM
merge_insert_types ::= NO_SYM | FIRST_SYM | LAST_SYM
udf_type ::= STRING_SYM | REAL_SYM | DECIMAL_SYM | INT_SYM
table_element_list ::= table_element | table_element_list ',' table_element
table_element ::= column_def | table_constraint_def
column_def ::= ident field_def opt_references
opt_references ::= | references
table_constraint_def ::= key_or_index opt_index_name_and_type '(' key_list_with_expression ')' opt_index_options | FULLTEXT_SYM opt_key_or_index opt_ident '(' key_list_with_expression ')' opt_fulltext_index_options | SPATIAL_SYM opt_key_or_index opt_ident '(' key_list_with_expression ')' opt_spatial_index_options | opt_constraint_name constraint_key_type opt_index_name_and_type '(' key_list_with_expression ')' opt_index_options | opt_constraint_name FOREIGN KEY_SYM opt_ident '(' key_list ')' references | opt_constraint_name check_constraint opt_constraint_enforcement
check_constraint ::= CHECK_SYM '(' expr ')'
opt_constraint_name ::= | CONSTRAINT opt_ident
opt_not ::= | NOT_SYM
opt_constraint_enforcement ::= | constraint_enforcement
constraint_enforcement ::= opt_not ENFORCED_SYM
field_def ::= type opt_column_attribute_list | type opt_collate opt_generated_always AS '(' expr ')' opt_stored_attribute opt_column_attribute_list
opt_generated_always ::= /*empty*/ | GENERATED ALWAYS_SYM
opt_stored_attribute ::= | VIRTUAL_SYM | STORED_SYM
type ::= int_type opt_field_length field_options | real_type opt_precision field_options | numeric_type float_options field_options | BIT_SYM | BIT_SYM field_length | BOOL_SYM | BOOLEAN_SYM | CHAR_SYM field_length opt_charset_with_opt_binary | CHAR_SYM opt_charset_with_opt_binary | nchar field_length opt_bin_mod | nchar opt_bin_mod | BINARY_SYM field_length | BINARY_SYM | varchar field_length opt_charset_with_opt_binary | nvarchar field_length opt_bin_mod | VARBINARY_SYM field_length | YEAR_SYM opt_field_length field_options | DATE_SYM | TIME_SYM type_datetime_precision | TIMESTAMP_SYM type_datetime_precision | DATETIME_SYM type_datetime_precision | TINYBLOB_SYM | BLOB_SYM opt_field_length | spatial_type | MEDIUMBLOB_SYM | LONGBLOB_SYM | LONG_SYM VARBINARY_SYM | LONG_SYM varchar opt_charset_with_opt_binary | TINYTEXT_SYN opt_charset_with_opt_binary | TEXT_SYM opt_field_length opt_charset_with_opt_binary | MEDIUMTEXT_SYM opt_charset_with_opt_binary | LONGTEXT_SYM opt_charset_with_opt_binary | ENUM_SYM '(' string_list ')' opt_charset_with_opt_binary | SET_SYM '(' string_list ')' opt_charset_with_opt_binary | LONG_SYM opt_charset_with_opt_binary | SERIAL_SYM | JSON_SYM
spatial_type ::= GEOMETRY_SYM | GEOMETRYCOLLECTION_SYM | POINT_SYM | MULTIPOINT_SYM | LINESTRING_SYM | MULTILINESTRING_SYM | POLYGON_SYM | MULTIPOLYGON_SYM
nchar ::= NCHAR_SYM | NATIONAL_SYM CHAR_SYM
varchar ::= CHAR_SYM VARYING | VARCHAR_SYM
nvarchar ::= NATIONAL_SYM VARCHAR_SYM | NVARCHAR_SYM | NCHAR_SYM VARCHAR_SYM | NATIONAL_SYM CHAR_SYM VARYING | NCHAR_SYM VARYING
int_type ::= INT_SYM | TINYINT_SYM | SMALLINT_SYM | MEDIUMINT_SYM | BIGINT_SYM
real_type ::= REAL_SYM | DOUBLE_SYM opt_PRECISION
opt_PRECISION ::= /*empty*/ | PRECISION
numeric_type ::= FLOAT_SYM | DECIMAL_SYM | NUMERIC_SYM | FIXED_SYM
standard_float_options ::= | field_length
float_options ::= | field_length | precision
precision ::= '(' NUM ',' NUM ')'
type_datetime_precision ::= | '(' NUM ')'
func_datetime_precision ::= | '(' ')' | '(' NUM ')'
field_options ::= | field_opt_list
field_opt_list ::= field_opt_list field_option | field_option
field_option ::= SIGNED_SYM | UNSIGNED_SYM | ZEROFILL_SYM
field_length ::= '(' LONG_NUM ')' | '(' ULONGLONG_NUM ')' | '(' DECIMAL_NUM ')' | '(' NUM ')'
opt_field_length ::= | field_length
opt_precision ::= | precision
opt_column_attribute_list ::= | column_attribute_list
column_attribute_list ::= column_attribute_list column_attribute | column_attribute
column_attribute ::= NULL_SYM | not NULL_SYM | not SECONDARY_SYM | DEFAULT_SYM now_or_signed_literal | DEFAULT_SYM '(' expr ')' | ON_SYM UPDATE_SYM now | AUTO_INC | SERIAL_SYM DEFAULT_SYM VALUE_SYM | opt_primary KEY_SYM | UNIQUE_SYM | UNIQUE_SYM KEY_SYM | CLUSTERING_SYM | CLUSTERING_SYM KEY_SYM | COMMENT_SYM TEXT_STRING_sys | COLLATE_SYM collation_name | COLUMN_FORMAT_SYM column_format | COLUMN_FORMAT_SYM COMPRESSED_SYM opt_with_compression_dictionary | STORAGE_SYM storage_media | SRID_SYM real_ulonglong_num | opt_constraint_name check_constraint | constraint_enforcement | ENGINE_ATTRIBUTE_SYM opt_equal json_attribute | SECONDARY_ENGINE_ATTRIBUTE_SYM opt_equal json_attribute | visibility
opt_with_compression_dictionary ::= | WITH COMPRESSION_DICTIONARY_SYM ident
column_format ::= DEFAULT_SYM | FIXED_SYM | DYNAMIC_SYM
storage_media ::= DEFAULT_SYM | DISK_SYM | MEMORY_SYM
now ::= NOW_SYM func_datetime_precision
now_or_signed_literal ::= now | signed_literal_or_null
character_set ::= CHAR_SYM SET_SYM | CHARSET
charset_name ::= ident_or_text | BINARY_SYM
opt_load_data_charset ::= | character_set charset_name
old_or_new_charset_name ::= ident_or_text | BINARY_SYM
old_or_new_charset_name_or_default ::= old_or_new_charset_name | DEFAULT_SYM
collation_name ::= ident_or_text | BINARY_SYM
opt_collate ::= | COLLATE_SYM collation_name
opt_default ::= | DEFAULT_SYM
ascii ::= ASCII_SYM | BINARY_SYM ASCII_SYM | ASCII_SYM BINARY_SYM
unicode ::= UNICODE_SYM | UNICODE_SYM BINARY_SYM | BINARY_SYM UNICODE_SYM
opt_charset_with_opt_binary ::= | ascii | unicode | BYTE_SYM | character_set charset_name opt_bin_mod | BINARY_SYM | BINARY_SYM character_set charset_name
opt_bin_mod ::= | BINARY_SYM
ws_num_codepoints ::= '(' real_ulong_num ')'
opt_primary ::= /*empty*/ | PRIMARY_SYM
references ::= REFERENCES table_ident opt_ref_list opt_match_clause opt_on_update_delete
opt_ref_list ::= | '(' reference_list ')'
reference_list ::= reference_list ',' ident | ident
opt_match_clause ::= | MATCH FULL | MATCH PARTIAL | MATCH SIMPLE_SYM
opt_on_update_delete ::= | ON_SYM UPDATE_SYM delete_option | ON_SYM DELETE_SYM delete_option | ON_SYM UPDATE_SYM delete_option ON_SYM DELETE_SYM delete_option | ON_SYM DELETE_SYM delete_option ON_SYM UPDATE_SYM delete_option
delete_option ::= RESTRICT | CASCADE | SET_SYM NULL_SYM | NO_SYM ACTION | SET_SYM DEFAULT_SYM
constraint_key_type ::= PRIMARY_SYM KEY_SYM | unique_combo_clustering opt_key_or_index
key_or_index ::= KEY_SYM | INDEX_SYM
opt_key_or_index ::= | key_or_index
keys_or_index ::= KEYS | INDEX_SYM | INDEXES
opt_unique_combo_clustering ::= | unique_combo_clustering
unique_combo_clustering ::= UNIQUE_SYM | UNIQUE_SYM KEY_SYM | CLUSTERING_SYM | CLUSTERING_SYM KEY_SYM | UNIQUE_SYM CLUSTERING_SYM | UNIQUE_SYM CLUSTERING_SYM KEY_SYM | CLUSTERING_SYM UNIQUE_SYM | CLUSTERING_SYM UNIQUE_SYM KEY_SYM
opt_fulltext_index_options ::= | fulltext_index_options
fulltext_index_options ::= fulltext_index_option | fulltext_index_options fulltext_index_option
fulltext_index_option ::= common_index_option | WITH PARSER_SYM IDENT_sys
opt_spatial_index_options ::= | spatial_index_options
spatial_index_options ::= spatial_index_option | spatial_index_options spatial_index_option
spatial_index_option ::= common_index_option
opt_index_options ::= | index_options
index_options ::= index_option | index_options index_option
index_option ::= common_index_option | index_type_clause
common_index_option ::= KEY_BLOCK_SIZE opt_equal ulong_num | COMMENT_SYM TEXT_STRING_sys | visibility | ENGINE_ATTRIBUTE_SYM opt_equal json_attribute | SECONDARY_ENGINE_ATTRIBUTE_SYM opt_equal json_attribute
opt_index_name_and_type ::= opt_ident | opt_ident USING index_type | ident TYPE_SYM index_type
opt_index_type_clause ::= | index_type_clause
index_type_clause ::= USING index_type | TYPE_SYM index_type
visibility ::= VISIBLE_SYM | INVISIBLE_SYM
index_type ::= BTREE_SYM | RTREE_SYM | HASH_SYM
key_list ::= key_list ',' key_part | key_part
key_part ::= ident opt_ordering_direction | ident '(' NUM ')' opt_ordering_direction
key_list_with_expression ::= key_list_with_expression ',' key_part_with_expression | key_part_with_expression
key_part_with_expression ::= key_part | '(' expr ')' opt_ordering_direction
opt_ident ::= | ident
opt_component ::= | '.' ident
string_list ::= text_string | string_list ',' text_string
alter_table_stmt ::= ALTER TABLE_SYM table_ident opt_alter_table_actions | ALTER TABLE_SYM table_ident standalone_alter_table_action
alter_database_stmt ::= ALTER DATABASE ident_or_empty alter_database_options
alter_procedure_stmt ::= ALTER PROCEDURE_SYM sp_name sp_a_chistics
alter_function_stmt ::= ALTER FUNCTION_SYM sp_name sp_a_chistics
alter_view_stmt ::= ALTER view_algorithm definer_opt view_tail | ALTER definer_opt view_tail
alter_event_stmt ::= ALTER definer_opt EVENT_SYM sp_name ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_status opt_ev_comment opt_ev_sql_stmt
alter_logfile_stmt ::= ALTER LOGFILE_SYM GROUP_SYM ident ADD lg_undofile opt_alter_logfile_group_options
alter_tablespace_stmt ::= ALTER TABLESPACE_SYM ident ADD ts_datafile opt_alter_tablespace_options | ALTER TABLESPACE_SYM ident DROP ts_datafile opt_alter_tablespace_options | ALTER TABLESPACE_SYM ident RENAME TO_SYM ident | ALTER TABLESPACE_SYM ident alter_tablespace_option_list
alter_undo_tablespace_stmt ::= ALTER UNDO_SYM TABLESPACE_SYM ident SET_SYM undo_tablespace_state opt_undo_tablespace_options
alter_server_stmt ::= ALTER SERVER_SYM ident_or_text OPTIONS_SYM '(' server_options_list ')'
alter_user_stmt ::= alter_user_command alter_user_list require_clause connect_options opt_account_lock_password_expire_options opt_user_attribute | alter_user_command user_func IDENTIFIED_SYM BY RANDOM_SYM PASSWORD opt_replace_password opt_retain_current_password | alter_user_command user_func IDENTIFIED_SYM BY TEXT_STRING opt_replace_password opt_retain_current_password | alter_user_command user_func DISCARD_SYM OLD_SYM PASSWORD | alter_user_command user DEFAULT_SYM ROLE_SYM ALL | alter_user_command user DEFAULT_SYM ROLE_SYM NONE_SYM | alter_user_command user DEFAULT_SYM ROLE_SYM role_list
opt_replace_password ::= | REPLACE_SYM TEXT_STRING_password
alter_resource_group_stmt ::= ALTER RESOURCE_SYM GROUP_SYM ident opt_resource_group_vcpu_list opt_resource_group_priority opt_resource_group_enable_disable opt_force
alter_user_command ::= ALTER USER if_exists
opt_user_attribute ::= | ATTRIBUTE_SYM TEXT_STRING_literal | COMMENT_SYM TEXT_STRING_literal
opt_account_lock_password_expire_options ::= | opt_account_lock_password_expire_option_list
opt_account_lock_password_expire_option_list ::= opt_account_lock_password_expire_option | opt_account_lock_password_expire_option_list opt_account_lock_password_expire_option
opt_account_lock_password_expire_option ::= ACCOUNT_SYM UNLOCK_SYM | ACCOUNT_SYM LOCK_SYM | PASSWORD EXPIRE_SYM | PASSWORD EXPIRE_SYM INTERVAL_SYM real_ulong_num DAY_SYM | PASSWORD EXPIRE_SYM NEVER_SYM | PASSWORD EXPIRE_SYM DEFAULT_SYM | PASSWORD HISTORY_SYM real_ulong_num | PASSWORD HISTORY_SYM DEFAULT_SYM | PASSWORD REUSE_SYM INTERVAL_SYM real_ulong_num DAY_SYM | PASSWORD REUSE_SYM INTERVAL_SYM DEFAULT_SYM | PASSWORD REQUIRE_SYM CURRENT_SYM | PASSWORD REQUIRE_SYM CURRENT_SYM DEFAULT_SYM | PASSWORD REQUIRE_SYM CURRENT_SYM OPTIONAL_SYM | FAILED_LOGIN_ATTEMPTS_SYM real_ulong_num | PASSWORD_LOCK_TIME_SYM real_ulong_num | PASSWORD_LOCK_TIME_SYM UNBOUNDED_SYM
connect_options ::= | WITH connect_option_list
connect_option_list ::= connect_option_list connect_option | connect_option
connect_option ::= MAX_QUERIES_PER_HOUR ulong_num | MAX_UPDATES_PER_HOUR ulong_num | MAX_CONNECTIONS_PER_HOUR ulong_num | MAX_USER_CONNECTIONS_SYM ulong_num
user_func ::= USER '(' ')'
ev_alter_on_schedule_completion ::= | ON_SYM SCHEDULE_SYM ev_schedule_time | ev_on_completion | ON_SYM SCHEDULE_SYM ev_schedule_time ev_on_completion
opt_ev_rename_to ::= | RENAME TO_SYM sp_name
opt_ev_sql_stmt ::= | DO_SYM ev_sql_stmt
ident_or_empty ::= | ident
opt_alter_table_actions ::= opt_alter_command_list | opt_alter_command_list alter_table_partition_options
standalone_alter_table_action ::= standalone_alter_commands | alter_commands_modifier_list ',' standalone_alter_commands
alter_table_partition_options ::= partition_clause | REMOVE_SYM PARTITIONING_SYM
opt_alter_command_list ::= | alter_commands_modifier_list | alter_list | alter_commands_modifier_list ',' alter_list
standalone_alter_commands ::= DISCARD_SYM TABLESPACE_SYM | IMPORT TABLESPACE_SYM | ADD PARTITION_SYM opt_no_write_to_binlog | ADD PARTITION_SYM opt_no_write_to_binlog '(' part_def_list ')' | ADD PARTITION_SYM opt_no_write_to_binlog PARTITIONS_SYM real_ulong_num | DROP PARTITION_SYM ident_string_list | REBUILD_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list | OPTIMIZE PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list | ANALYZE_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list | CHECK_SYM PARTITION_SYM all_or_alt_part_name_list opt_mi_check_types | REPAIR PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list opt_mi_repair_types | COALESCE PARTITION_SYM opt_no_write_to_binlog real_ulong_num | TRUNCATE_SYM PARTITION_SYM all_or_alt_part_name_list | REORGANIZE_SYM PARTITION_SYM opt_no_write_to_binlog | REORGANIZE_SYM PARTITION_SYM opt_no_write_to_binlog ident_string_list INTO '(' part_def_list ')' | EXCHANGE_SYM PARTITION_SYM ident WITH TABLE_SYM table_ident opt_with_validation | DISCARD_SYM PARTITION_SYM all_or_alt_part_name_list TABLESPACE_SYM | IMPORT PARTITION_SYM all_or_alt_part_name_list TABLESPACE_SYM | SECONDARY_LOAD_SYM | SECONDARY_UNLOAD_SYM
opt_with_validation ::= | with_validation
with_validation ::= WITH VALIDATION_SYM | WITHOUT_SYM VALIDATION_SYM
all_or_alt_part_name_list ::= ALL | ident_string_list
alter_list ::= alter_list_item | alter_list ',' alter_list_item | alter_list ',' alter_commands_modifier | create_table_options_space_separated | alter_list ',' create_table_options_space_separated
alter_commands_modifier_list ::= alter_commands_modifier | alter_commands_modifier_list ',' alter_commands_modifier
alter_list_item ::= ADD opt_column ident field_def opt_references opt_place | ADD opt_column '(' table_element_list ')' | ADD table_constraint_def | CHANGE opt_column ident ident field_def opt_place | MODIFY_SYM opt_column ident field_def opt_place | DROP opt_column ident opt_restrict | DROP FOREIGN KEY_SYM ident | DROP PRIMARY_SYM KEY_SYM | DROP key_or_index ident | DROP CHECK_SYM ident | DROP CONSTRAINT ident | DISABLE_SYM KEYS | ENABLE_SYM KEYS | ALTER opt_column ident SET_SYM DEFAULT_SYM signed_literal_or_null | ALTER opt_column ident SET_SYM DEFAULT_SYM '(' expr ')' | ALTER opt_column ident DROP DEFAULT_SYM | ALTER opt_column ident SET_SYM visibility | ALTER INDEX_SYM ident visibility | ALTER CHECK_SYM ident constraint_enforcement | ALTER CONSTRAINT ident constraint_enforcement | RENAME opt_to table_ident | RENAME key_or_index ident TO_SYM ident | RENAME COLUMN_SYM ident TO_SYM ident | CONVERT_SYM TO_SYM character_set charset_name opt_collate | CONVERT_SYM TO_SYM character_set DEFAULT_SYM opt_collate | FORCE_SYM | ORDER_SYM BY alter_order_list
alter_commands_modifier ::= alter_algorithm_option | alter_lock_option | with_validation
opt_index_lock_and_algorithm ::= | alter_lock_option | alter_algorithm_option | alter_lock_option alter_algorithm_option | alter_algorithm_option alter_lock_option
alter_algorithm_option ::= ALGORITHM_SYM opt_equal alter_algorithm_option_value
alter_algorithm_option_value ::= DEFAULT_SYM | ident
alter_lock_option ::= LOCK_SYM opt_equal alter_lock_option_value
alter_lock_option_value ::= DEFAULT_SYM | ident
opt_column ::= /*empty*/ | COLUMN_SYM
opt_ignore ::= | IGNORE_SYM
opt_restrict ::= | RESTRICT | CASCADE
opt_place ::= | AFTER_SYM ident | FIRST_SYM
opt_to ::= | TO_SYM | EQ | AS
group_replication ::= group_replication_start opt_group_replication_start_options | STOP_SYM GROUP_REPLICATION
group_replication_start ::= START_SYM GROUP_REPLICATION
opt_group_replication_start_options ::= /*empty*/ | group_replication_start_options
group_replication_start_options ::= group_replication_start_option | group_replication_start_options ',' group_replication_start_option
group_replication_start_option ::= group_replication_user | group_replication_password | group_replication_plugin_auth
group_replication_user ::= USER EQ TEXT_STRING_sys_nonewline
group_replication_password ::= PASSWORD EQ TEXT_STRING_sys_nonewline
group_replication_plugin_auth ::= DEFAULT_AUTH_SYM EQ TEXT_STRING_sys_nonewline
replica ::= SLAVE | REPLICA_SYM
stop_replica_stmt ::= STOP_SYM replica opt_replica_thread_option_list opt_channel
start_replica_stmt ::= START_SYM replica opt_replica_thread_option_list opt_replica_until opt_user_option opt_password_option opt_default_auth_option opt_plugin_dir_option opt_channel
start ::= START_SYM TRANSACTION_SYM opt_start_transaction_option_list
opt_start_transaction_option_list ::= | start_transaction_option_list
start_transaction_option_list ::= start_transaction_option | start_transaction_option_list ',' start_transaction_option
start_transaction_option ::= WITH CONSISTENT_SYM SNAPSHOT_SYM | WITH CONSISTENT_SYM SNAPSHOT_SYM FROM SESSION_SYM expr | READ_SYM ONLY_SYM | READ_SYM WRITE_SYM
opt_user_option ::= | USER EQ TEXT_STRING_sys
opt_password_option ::= | PASSWORD EQ TEXT_STRING_sys
opt_default_auth_option ::= | DEFAULT_AUTH_SYM EQ TEXT_STRING_sys
opt_plugin_dir_option ::= | PLUGIN_DIR_SYM EQ TEXT_STRING_sys
opt_replica_thread_option_list ::= | replica_thread_option_list
replica_thread_option_list ::= replica_thread_option | replica_thread_option_list ',' replica_thread_option
replica_thread_option ::= SQL_THREAD | RELAY_THREAD
opt_replica_until ::= | UNTIL_SYM replica_until
replica_until ::= source_file_def | replica_until ',' source_file_def | SQL_BEFORE_GTIDS EQ TEXT_STRING_sys | SQL_AFTER_GTIDS EQ TEXT_STRING_sys | SQL_AFTER_MTS_GAPS
checksum ::= CHECKSUM_SYM table_or_tables table_list opt_checksum_type
opt_checksum_type ::= | QUICK | EXTENDED_SYM
repair_table_stmt ::= REPAIR opt_no_write_to_binlog table_or_tables table_list opt_mi_repair_types
opt_mi_repair_types ::= | mi_repair_types
mi_repair_types ::= mi_repair_type | mi_repair_types mi_repair_type
mi_repair_type ::= QUICK | EXTENDED_SYM | USE_FRM
analyze_table_stmt ::= ANALYZE_SYM opt_no_write_to_binlog table_or_tables table_list opt_histogram
opt_num_buckets ::= | WITH NUM BUCKETS_SYM
opt_histogram ::= | UPDATE_SYM HISTOGRAM_SYM ON_SYM ident_string_list opt_num_buckets | DROP HISTOGRAM_SYM ON_SYM ident_string_list
binlog_base64_event ::= BINLOG_SYM TEXT_STRING_sys
check_table_stmt ::= CHECK_SYM table_or_tables table_list opt_mi_check_types
opt_mi_check_types ::= | mi_check_types
mi_check_types ::= mi_check_type | mi_check_type mi_check_types
mi_check_type ::= QUICK | FAST_SYM | MEDIUM_SYM | EXTENDED_SYM | CHANGED | FOR_SYM UPGRADE_SYM
optimize_table_stmt ::= OPTIMIZE opt_no_write_to_binlog table_or_tables table_list
opt_no_write_to_binlog ::= | NO_WRITE_TO_BINLOG | LOCAL_SYM
rename ::= RENAME table_or_tables table_to_table_list | RENAME USER rename_list
rename_list ::= user TO_SYM user | rename_list ',' user TO_SYM user
table_to_table_list ::= table_to_table | table_to_table_list ',' table_to_table
table_to_table ::= table_ident TO_SYM table_ident
keycache_stmt ::= CACHE_SYM INDEX_SYM keycache_list IN_SYM key_cache_name | CACHE_SYM INDEX_SYM table_ident adm_partition opt_cache_key_list IN_SYM key_cache_name
keycache_list ::= assign_to_keycache | keycache_list ',' assign_to_keycache
assign_to_keycache ::= table_ident opt_cache_key_list
key_cache_name ::= ident | DEFAULT_SYM
preload_stmt ::= LOAD INDEX_SYM INTO CACHE_SYM table_ident adm_partition opt_cache_key_list opt_ignore_leaves | LOAD INDEX_SYM INTO CACHE_SYM preload_list
preload_list ::= preload_keys | preload_list ',' preload_keys
preload_keys ::= table_ident opt_cache_key_list opt_ignore_leaves
adm_partition ::= PARTITION_SYM '(' all_or_alt_part_name_list ')'
opt_cache_key_list ::= | key_or_index '(' opt_key_usage_list ')'
opt_ignore_leaves ::= | IGNORE_SYM LEAVES
select_stmt ::= query_expression | query_expression locking_clause_list | query_expression_parens | select_stmt_with_into
select_stmt_with_into ::= '(' select_stmt_with_into ')' | query_expression into_clause | query_expression into_clause locking_clause_list | query_expression locking_clause_list into_clause | query_expression_parens into_clause
query_expression ::= query_expression_body opt_order_clause opt_limit_clause | with_clause query_expression_body opt_order_clause opt_limit_clause | query_expression_parens order_clause opt_limit_clause | with_clause query_expression_parens order_clause opt_limit_clause | query_expression_parens limit_clause | with_clause query_expression_parens limit_clause | with_clause query_expression_parens
query_expression_body ::= query_primary | query_expression_body UNION_SYM union_option query_primary | query_expression_parens UNION_SYM union_option query_primary | query_expression_body UNION_SYM union_option query_expression_parens | query_expression_parens UNION_SYM union_option query_expression_parens
query_expression_parens ::= '(' query_expression_parens ')' | '(' query_expression ')' | '(' query_expression locking_clause_list ')'
query_primary ::= query_specification | table_value_constructor | explicit_table
query_specification ::= SELECT_SYM select_options select_item_list into_clause opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause | SELECT_SYM select_options select_item_list opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause
opt_from_clause ::= | from_clause
from_clause ::= FROM from_tables
from_tables ::= DUAL_SYM | table_reference_list
table_reference_list ::= table_reference | table_reference_list ',' table_reference
table_value_constructor ::= VALUES values_row_list
explicit_table ::= TABLE_SYM table_ident
select_options ::= | select_option_list
select_option_list ::= select_option_list select_option | select_option
select_option ::= query_spec_option | SQL_NO_CACHE_SYM
locking_clause_list ::= locking_clause_list locking_clause | locking_clause
locking_clause ::= FOR_SYM lock_strength opt_locked_row_action | FOR_SYM lock_strength table_locking_list opt_locked_row_action | LOCK_SYM IN_SYM SHARE_SYM MODE_SYM
lock_strength ::= UPDATE_SYM | SHARE_SYM
table_locking_list ::= OF_SYM table_alias_ref_list
opt_locked_row_action ::= | locked_row_action
locked_row_action ::= SKIP_SYM LOCKED_SYM | NOWAIT_SYM
select_item_list ::= select_item_list ',' select_item | select_item | '*'
select_item ::= table_wild | expr select_alias
select_alias ::= | AS ident | AS TEXT_STRING_validated | ident | TEXT_STRING_validated
optional_braces ::= | '(' ')'
expr ::= expr or expr | expr XOR expr | expr and expr | NOT_SYM expr | bool_pri IS TRUE_SYM | bool_pri IS not TRUE_SYM | bool_pri IS FALSE_SYM | bool_pri IS not FALSE_SYM | bool_pri IS UNKNOWN_SYM | bool_pri IS not UNKNOWN_SYM | bool_pri
bool_pri ::= bool_pri IS NULL_SYM | bool_pri IS not NULL_SYM | bool_pri comp_op predicate | bool_pri comp_op all_or_any table_subquery | predicate
predicate ::= bit_expr IN_SYM table_subquery | bit_expr not IN_SYM table_subquery | bit_expr IN_SYM '(' expr ')' | bit_expr IN_SYM '(' expr ',' expr_list ')' | bit_expr not IN_SYM '(' expr ')' | bit_expr not IN_SYM '(' expr ',' expr_list ')' | bit_expr MEMBER_SYM opt_of '(' simple_expr ')' | bit_expr BETWEEN_SYM bit_expr AND_SYM predicate | bit_expr not BETWEEN_SYM bit_expr AND_SYM predicate | bit_expr SOUNDS_SYM LIKE bit_expr | bit_expr LIKE simple_expr | bit_expr LIKE simple_expr ESCAPE_SYM simple_expr | bit_expr not LIKE simple_expr | bit_expr not LIKE simple_expr ESCAPE_SYM simple_expr | bit_expr REGEXP bit_expr | bit_expr not REGEXP bit_expr | bit_expr
opt_of ::= OF_SYM | /*empty*/
bit_expr ::= bit_expr '|' bit_expr | bit_expr '&' bit_expr | bit_expr SHIFT_LEFT bit_expr | bit_expr SHIFT_RIGHT bit_expr | bit_expr '+' bit_expr | bit_expr '-' bit_expr | bit_expr '+' INTERVAL_SYM expr interval | bit_expr '-' INTERVAL_SYM expr interval | bit_expr '*' bit_expr | bit_expr '/' bit_expr | bit_expr '%' bit_expr | bit_expr DIV_SYM bit_expr | bit_expr MOD_SYM bit_expr | bit_expr '^' bit_expr | simple_expr
or ::= OR_SYM | OR2_SYM
and ::= AND_SYM | AND_AND_SYM
not ::= NOT_SYM | NOT2_SYM
not2 ::= '!' | NOT2_SYM
comp_op ::= EQ | EQUAL_SYM | GE | GT_SYM | LE | LT | NE
all_or_any ::= ALL | ANY_SYM
simple_expr ::= simple_ident | function_call_keyword | function_call_nonkeyword | function_call_generic | function_call_conflict | simple_expr COLLATE_SYM ident_or_text | literal_or_null | param_marker | variable | set_function_specification | window_func_call | simple_expr OR_OR_SYM simple_expr | '+' simple_expr | '-' simple_expr | '~' simple_expr | not2 simple_expr | row_subquery | '(' expr ')' | '(' expr ',' expr_list ')' | ROW_SYM '(' expr ',' expr_list ')' | EXISTS table_subquery | '{' ident expr '}' | MATCH ident_list_arg AGAINST '(' bit_expr fulltext_options ')' | BINARY_SYM simple_expr | CAST_SYM '(' expr AS cast_type opt_array_cast ')' | CAST_SYM '(' expr AT_SYM LOCAL_SYM AS cast_type opt_array_cast ')' | CAST_SYM '(' expr AT_SYM TIME_SYM ZONE_SYM opt_interval TEXT_STRING_literal AS DATETIME_SYM type_datetime_precision ')' | CASE_SYM opt_expr when_list opt_else END | CONVERT_SYM '(' expr ',' cast_type ')' | CONVERT_SYM '(' expr USING charset_name ')' | DEFAULT_SYM '(' simple_ident ')' | VALUES '(' simple_ident_nospvar ')' | INTERVAL_SYM expr interval '+' expr | simple_ident JSON_SEPARATOR_SYM TEXT_STRING_literal | simple_ident JSON_UNQUOTED_SEPARATOR_SYM TEXT_STRING_literal
opt_array_cast ::= | ARRAY_SYM
function_call_keyword ::= CHAR_SYM '(' expr_list ')' | CHAR_SYM '(' expr_list USING charset_name ')' | CURRENT_USER optional_braces | DATE_SYM '(' expr ')' | DAY_SYM '(' expr ')' | HOUR_SYM '(' expr ')' | INSERT_SYM '(' expr ',' expr ',' expr ',' expr ')' | INTERVAL_SYM '(' expr ',' expr ')' | INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' | JSON_VALUE_SYM '(' simple_expr ',' text_literal opt_returning_type opt_on_empty_or_error ')' | LEFT '(' expr ',' expr ')' | MINUTE_SYM '(' expr ')' | MONTH_SYM '(' expr ')' | RIGHT '(' expr ',' expr ')' | SECOND_SYM '(' expr ')' | TIME_SYM '(' expr ')' | TIMESTAMP_SYM '(' expr ')' | TIMESTAMP_SYM '(' expr ',' expr ')' | TRIM '(' expr ')' | TRIM '(' LEADING expr FROM expr ')' | TRIM '(' TRAILING expr FROM expr ')' | TRIM '(' BOTH expr FROM expr ')' | TRIM '(' LEADING FROM expr ')' | TRIM '(' TRAILING FROM expr ')' | TRIM '(' BOTH FROM expr ')' | TRIM '(' expr FROM expr ')' | USER '(' ')' | YEAR_SYM '(' expr ')'
function_call_nonkeyword ::= ADDDATE_SYM '(' expr ',' expr ')' | ADDDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' | CURDATE optional_braces | CURTIME func_datetime_precision | DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' | DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' | EXTRACT_SYM '(' interval FROM expr ')' | GET_FORMAT '(' date_time_type ',' expr ')' | now | POSITION_SYM '(' bit_expr IN_SYM expr ')' | SUBDATE_SYM '(' expr ',' expr ')' | SUBDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' | SUBSTRING '(' expr ',' expr ',' expr ')' | SUBSTRING '(' expr ',' expr ')' | SUBSTRING '(' expr FROM expr FOR_SYM expr ')' | SUBSTRING '(' expr FROM expr ')' | SYSDATE func_datetime_precision | TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')' | TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')' | UTC_DATE_SYM optional_braces | UTC_TIME_SYM func_datetime_precision | UTC_TIMESTAMP_SYM func_datetime_precision
opt_returning_type ::= | RETURNING_SYM cast_type
function_call_conflict ::= ASCII_SYM '(' expr ')' | CHARSET '(' expr ')' | COALESCE '(' expr_list ')' | COLLATION_SYM '(' expr ')' | DATABASE '(' ')' | IF '(' expr ',' expr ',' expr ')' | FORMAT_SYM '(' expr ',' expr ')' | FORMAT_SYM '(' expr ',' expr ',' expr ')' | MICROSECOND_SYM '(' expr ')' | MOD_SYM '(' expr ',' expr ')' | QUARTER_SYM '(' expr ')' | REPEAT_SYM '(' expr ',' expr ')' | REPLACE_SYM '(' expr ',' expr ',' expr ')' | REVERSE_SYM '(' expr ')' | ROW_COUNT_SYM '(' ')' | TRUNCATE_SYM '(' expr ',' expr ')' | WEEK_SYM '(' expr ')' | WEEK_SYM '(' expr ',' expr ')' | WEIGHT_STRING_SYM '(' expr ')' | WEIGHT_STRING_SYM '(' expr AS CHAR_SYM ws_num_codepoints ')' | WEIGHT_STRING_SYM '(' expr AS BINARY_SYM ws_num_codepoints ')' | WEIGHT_STRING_SYM '(' expr ',' ulong_num ',' ulong_num ',' ulong_num ')' | geometry_function
geometry_function ::= GEOMETRYCOLLECTION_SYM '(' opt_expr_list ')' | LINESTRING_SYM '(' expr_list ')' | MULTILINESTRING_SYM '(' expr_list ')' | MULTIPOINT_SYM '(' expr_list ')' | MULTIPOLYGON_SYM '(' expr_list ')' | POINT_SYM '(' expr ',' expr ')' | POLYGON_SYM '(' expr_list ')'
function_call_generic ::= IDENT_sys '(' opt_udf_expr_list ')' | ident '.' ident '(' opt_expr_list ')'
fulltext_options ::= opt_natural_language_mode opt_query_expansion | IN_SYM BOOLEAN_SYM MODE_SYM
opt_natural_language_mode ::= | IN_SYM NATURAL LANGUAGE_SYM MODE_SYM
opt_query_expansion ::= | WITH QUERY_SYM EXPANSION_SYM
opt_udf_expr_list ::= | udf_expr_list
udf_expr_list ::= udf_expr | udf_expr_list ',' udf_expr
udf_expr ::= expr select_alias
set_function_specification ::= sum_expr | grouping_operation
sum_expr ::= AVG_SYM '(' in_sum_expr ')' opt_windowing_clause | AVG_SYM '(' DISTINCT in_sum_expr ')' opt_windowing_clause | BIT_AND_SYM '(' in_sum_expr ')' opt_windowing_clause | BIT_OR_SYM '(' in_sum_expr ')' opt_windowing_clause | JSON_ARRAYAGG '(' in_sum_expr ')' opt_windowing_clause | JSON_OBJECTAGG '(' in_sum_expr ',' in_sum_expr ')' opt_windowing_clause | BIT_XOR_SYM '(' in_sum_expr ')' opt_windowing_clause | COUNT_SYM '(' opt_all '*' ')' opt_windowing_clause | COUNT_SYM '(' in_sum_expr ')' opt_windowing_clause | COUNT_SYM '(' DISTINCT expr_list ')' opt_windowing_clause | MIN_SYM '(' in_sum_expr ')' opt_windowing_clause | MIN_SYM '(' DISTINCT in_sum_expr ')' opt_windowing_clause | MAX_SYM '(' in_sum_expr ')' opt_windowing_clause | MAX_SYM '(' DISTINCT in_sum_expr ')' opt_windowing_clause | STD_SYM '(' in_sum_expr ')' opt_windowing_clause | VARIANCE_SYM '(' in_sum_expr ')' opt_windowing_clause | STDDEV_SAMP_SYM '(' in_sum_expr ')' opt_windowing_clause | VAR_SAMP_SYM '(' in_sum_expr ')' opt_windowing_clause | SUM_SYM '(' in_sum_expr ')' opt_windowing_clause | SUM_SYM '(' DISTINCT in_sum_expr ')' opt_windowing_clause | GROUP_CONCAT_SYM '(' opt_distinct expr_list opt_gorder_clause opt_gconcat_separator ')' opt_windowing_clause
window_func_call ::= ROW_NUMBER_SYM '(' ')' windowing_clause | RANK_SYM '(' ')' windowing_clause | DENSE_RANK_SYM '(' ')' windowing_clause | CUME_DIST_SYM '(' ')' windowing_clause | PERCENT_RANK_SYM '(' ')' windowing_clause | NTILE_SYM '(' stable_integer ')' windowing_clause | LEAD_SYM '(' expr opt_lead_lag_info ')' opt_null_treatment windowing_clause | LAG_SYM '(' expr opt_lead_lag_info ')' opt_null_treatment windowing_clause | FIRST_VALUE_SYM '(' expr ')' opt_null_treatment windowing_clause | LAST_VALUE_SYM '(' expr ')' opt_null_treatment windowing_clause | NTH_VALUE_SYM '(' expr ',' simple_expr ')' opt_from_first_last opt_null_treatment windowing_clause
opt_lead_lag_info ::= | ',' stable_integer opt_ll_default
stable_integer ::= int64_literal | param_or_var
param_or_var ::= param_marker | ident | '@' ident_or_text
opt_ll_default ::= | ',' expr
opt_null_treatment ::= | RESPECT_SYM NULLS_SYM | IGNORE_SYM NULLS_SYM
opt_from_first_last ::= | FROM FIRST_SYM | FROM LAST_SYM
opt_windowing_clause ::= | windowing_clause
windowing_clause ::= OVER_SYM window_name_or_spec
window_name_or_spec ::= window_name | window_spec
window_name ::= ident
window_spec ::= '(' window_spec_details ')'
window_spec_details ::= opt_existing_window_name opt_partition_clause opt_window_order_by_clause opt_window_frame_clause
opt_existing_window_name ::= | window_name
opt_partition_clause ::= | PARTITION_SYM BY group_list
opt_window_order_by_clause ::= | ORDER_SYM BY order_list
opt_window_frame_clause ::= | window_frame_units window_frame_extent opt_window_frame_exclusion
window_frame_extent ::= window_frame_start | window_frame_between
window_frame_start ::= UNBOUNDED_SYM PRECEDING_SYM | NUM_literal PRECEDING_SYM | param_marker PRECEDING_SYM | INTERVAL_SYM expr interval PRECEDING_SYM | CURRENT_SYM ROW_SYM
window_frame_between ::= BETWEEN_SYM window_frame_bound AND_SYM window_frame_bound
window_frame_bound ::= window_frame_start | UNBOUNDED_SYM FOLLOWING_SYM | NUM_literal FOLLOWING_SYM | param_marker FOLLOWING_SYM | INTERVAL_SYM expr interval FOLLOWING_SYM
opt_window_frame_exclusion ::= | EXCLUDE_SYM CURRENT_SYM ROW_SYM | EXCLUDE_SYM GROUP_SYM | EXCLUDE_SYM TIES_SYM | EXCLUDE_SYM NO_SYM OTHERS_SYM
window_frame_units ::= ROWS_SYM | RANGE_SYM | GROUPS_SYM
grouping_operation ::= GROUPING_SYM '(' expr_list ')'
variable ::= '@' variable_aux
variable_aux ::= ident_or_text SET_VAR expr | ident_or_text | '@' opt_var_ident_type ident_or_text opt_component
opt_distinct ::= | DISTINCT
opt_gconcat_separator ::= | SEPARATOR_SYM text_string
opt_gorder_clause ::= | ORDER_SYM BY gorder_list
gorder_list ::= gorder_list ',' order_expr | order_expr
in_sum_expr ::= opt_all expr
cast_type ::= BINARY_SYM opt_field_length | CHAR_SYM opt_field_length opt_charset_with_opt_binary | nchar opt_field_length | SIGNED_SYM | SIGNED_SYM INT_SYM | UNSIGNED_SYM | UNSIGNED_SYM INT_SYM | DATE_SYM | YEAR_SYM | TIME_SYM type_datetime_precision | DATETIME_SYM type_datetime_precision | DECIMAL_SYM float_options | JSON_SYM | real_type | FLOAT_SYM standard_float_options
opt_expr_list ::= | expr_list
expr_list ::= expr | expr_list ',' expr
ident_list_arg ::= ident_list | '(' ident_list ')'
ident_list ::= simple_ident | ident_list ',' simple_ident
opt_expr ::= | expr
opt_else ::= | ELSE expr
when_list ::= WHEN_SYM expr THEN_SYM expr | when_list WHEN_SYM expr THEN_SYM expr
table_reference ::= table_factor | joined_table | '{' OJ_SYM esc_table_reference '}'
esc_table_reference ::= table_factor | joined_table
joined_table ::= table_reference inner_join_type table_reference ON_SYM expr | table_reference inner_join_type table_reference USING '(' using_list ')' | table_reference outer_join_type table_reference ON_SYM expr | table_reference outer_join_type table_reference USING '(' using_list ')' | table_reference inner_join_type table_reference | table_reference natural_join_type table_factor
natural_join_type ::= NATURAL opt_inner JOIN_SYM | NATURAL RIGHT opt_outer JOIN_SYM | NATURAL LEFT opt_outer JOIN_SYM
inner_join_type ::= JOIN_SYM | INNER_SYM JOIN_SYM | CROSS JOIN_SYM | STRAIGHT_JOIN
outer_join_type ::= LEFT opt_outer JOIN_SYM | RIGHT opt_outer JOIN_SYM
opt_inner ::= /*empty*/ | INNER_SYM
opt_outer ::= /*empty*/ | OUTER_SYM
opt_use_partition ::= | use_partition
use_partition ::= PARTITION_SYM '(' using_list ')'
table_factor ::= single_table | single_table_parens | derived_table | joined_table_parens | table_reference_list_parens | table_function
table_reference_list_parens ::= '(' table_reference_list_parens ')' | '(' table_reference_list ',' table_reference ')'
single_table_parens ::= '(' single_table_parens ')' | '(' single_table ')'
single_table ::= table_ident opt_use_partition opt_table_alias opt_key_definition
joined_table_parens ::= '(' joined_table_parens ')' | '(' joined_table ')'
derived_table ::= table_subquery opt_table_alias opt_derived_column_list | LATERAL_SYM table_subquery opt_table_alias opt_derived_column_list
table_function ::= JSON_TABLE_SYM '(' expr ',' text_literal columns_clause ')' opt_table_alias | SEQUENCE_TABLE_SYM '(' expr ')' opt_table_alias
columns_clause ::= COLUMNS '(' columns_list ')'
columns_list ::= jt_column | columns_list ',' jt_column
jt_column ::= ident FOR_SYM ORDINALITY_SYM | ident type opt_collate jt_column_type PATH_SYM text_literal opt_on_empty_or_error_json_table | NESTED_SYM PATH_SYM text_literal columns_clause
jt_column_type ::= | EXISTS
opt_on_empty_or_error ::= | on_empty | on_error | on_empty on_error
opt_on_empty_or_error_json_table ::= opt_on_empty_or_error | on_error on_empty
on_empty ::= json_on_response ON_SYM EMPTY_SYM
on_error ::= json_on_response ON_SYM ERROR_SYM
json_on_response ::= ERROR_SYM | NULL_SYM | DEFAULT_SYM signed_literal
index_hint_clause ::= | FOR_SYM JOIN_SYM | FOR_SYM ORDER_SYM BY | FOR_SYM GROUP_SYM BY
index_hint_type ::= FORCE_SYM | IGNORE_SYM
index_hint_definition ::= index_hint_type key_or_index index_hint_clause '(' key_usage_list ')' | USE_SYM key_or_index index_hint_clause '(' opt_key_usage_list ')'
index_hints_list ::= index_hint_definition | index_hints_list index_hint_definition
opt_index_hints_list ::= | index_hints_list
opt_key_definition ::= opt_index_hints_list
opt_key_usage_list ::= | key_usage_list
key_usage_element ::= ident | PRIMARY_SYM
key_usage_list ::= key_usage_element | key_usage_list ',' key_usage_element
using_list ::= ident_string_list
ident_string_list ::= ident | ident_string_list ',' ident
interval ::= interval_time_stamp | DAY_HOUR_SYM | DAY_MICROSECOND_SYM | DAY_MINUTE_SYM | DAY_SECOND_SYM | HOUR_MICROSECOND_SYM | HOUR_MINUTE_SYM | HOUR_SECOND_SYM | MINUTE_MICROSECOND_SYM | MINUTE_SECOND_SYM | SECOND_MICROSECOND_SYM | YEAR_MONTH_SYM
interval_time_stamp ::= DAY_SYM | WEEK_SYM | HOUR_SYM | MINUTE_SYM | MONTH_SYM | QUARTER_SYM | SECOND_SYM | MICROSECOND_SYM | YEAR_SYM
date_time_type ::= DATE_SYM | TIME_SYM | TIMESTAMP_SYM | DATETIME_SYM
opt_as ::= /*empty*/ | AS
opt_table_alias ::= | opt_as ident
opt_all ::= /*empty*/ | ALL
opt_where_clause ::= | where_clause
where_clause ::= WHERE expr
opt_having_clause ::= | HAVING expr
with_clause ::= WITH with_list | WITH RECURSIVE_SYM with_list
with_list ::= with_list ',' common_table_expr | common_table_expr
common_table_expr ::= ident opt_derived_column_list AS table_subquery
opt_derived_column_list ::= | '(' simple_ident_list ')'
simple_ident_list ::= ident | simple_ident_list ',' ident
opt_window_clause ::= | WINDOW_SYM window_definition_list
window_definition_list ::= window_definition | window_definition_list ',' window_definition
window_definition ::= window_name AS window_spec
opt_group_clause ::= | GROUP_SYM BY group_list olap_opt
group_list ::= group_list ',' grouping_expr | grouping_expr
olap_opt ::= | WITH_ROLLUP_SYM
alter_order_list ::= alter_order_list ',' alter_order_item | alter_order_item
alter_order_item ::= simple_ident_nospvar opt_ordering_direction
opt_order_clause ::= | order_clause
order_clause ::= ORDER_SYM BY order_list
order_list ::= order_list ',' order_expr | order_expr
opt_ordering_direction ::= | ordering_direction
ordering_direction ::= ASC | DESC
opt_limit_clause ::= | limit_clause
limit_clause ::= LIMIT limit_options
limit_options ::= limit_option | limit_option ',' limit_option | limit_option OFFSET_SYM limit_option
limit_option ::= ident | param_marker | ULONGLONG_NUM | LONG_NUM | NUM
opt_simple_limit ::= | LIMIT limit_option
ulong_num ::= NUM | HEX_NUM | LONG_NUM | ULONGLONG_NUM | DECIMAL_NUM | FLOAT_NUM
real_ulong_num ::= NUM | HEX_NUM | LONG_NUM | ULONGLONG_NUM | dec_num_error
ulonglong_num ::= NUM | ULONGLONG_NUM | LONG_NUM | DECIMAL_NUM | FLOAT_NUM
real_ulonglong_num ::= NUM | HEX_NUM | ULONGLONG_NUM | LONG_NUM | dec_num_error
dec_num_error ::= dec_num
dec_num ::= DECIMAL_NUM | FLOAT_NUM
select_var_list ::= select_var_list ',' select_var_ident | select_var_ident
select_var_ident ::= '@' ident_or_text | ident_or_text
into_clause ::= INTO into_destination
into_destination ::= OUTFILE TEXT_STRING_filesystem opt_load_data_charset opt_field_term opt_line_term | DUMPFILE TEXT_STRING_filesystem | select_var_list
do_stmt ::= DO_SYM select_item_list
drop_table_stmt ::= DROP opt_temporary table_or_tables if_exists table_list opt_restrict
drop_index_stmt ::= DROP INDEX_SYM ident ON_SYM table_ident opt_index_lock_and_algorithm
drop_database_stmt ::= DROP DATABASE if_exists ident
drop_function_stmt ::= DROP FUNCTION_SYM if_exists ident '.' ident | DROP FUNCTION_SYM if_exists ident
drop_resource_group_stmt ::= DROP RESOURCE_SYM GROUP_SYM ident opt_force
drop_procedure_stmt ::= DROP PROCEDURE_SYM if_exists sp_name
drop_user_stmt ::= DROP USER if_exists user_list
drop_view_stmt ::= DROP VIEW_SYM if_exists table_list opt_restrict
drop_event_stmt ::= DROP EVENT_SYM if_exists sp_name
drop_trigger_stmt ::= DROP TRIGGER_SYM if_exists sp_name
drop_tablespace_stmt ::= DROP TABLESPACE_SYM ident opt_drop_ts_options
drop_undo_tablespace_stmt ::= DROP UNDO_SYM TABLESPACE_SYM ident opt_undo_tablespace_options
drop_logfile_stmt ::= DROP LOGFILE_SYM GROUP_SYM ident opt_drop_ts_options
drop_server_stmt ::= DROP SERVER_SYM if_exists ident_or_text | DROP COMPRESSION_DICTIONARY_SYM if_exists ident
drop_srs_stmt ::= DROP SPATIAL_SYM REFERENCE_SYM SYSTEM_SYM if_exists real_ulonglong_num
drop_role_stmt ::= DROP ROLE_SYM if_exists role_list
table_list ::= table_ident | table_list ',' table_ident
table_alias_ref_list ::= table_ident_opt_wild | table_alias_ref_list ',' table_ident_opt_wild
if_exists ::= | IF EXISTS
opt_temporary ::= | TEMPORARY
opt_drop_ts_options ::= | drop_ts_option_list
drop_ts_option_list ::= drop_ts_option | drop_ts_option_list opt_comma drop_ts_option
drop_ts_option ::= ts_option_engine | ts_option_wait
insert_stmt ::= INSERT_SYM insert_lock_option opt_ignore opt_INTO table_ident opt_use_partition insert_from_constructor opt_values_reference opt_insert_update_list | INSERT_SYM insert_lock_option opt_ignore opt_INTO table_ident opt_use_partition SET_SYM update_list opt_values_reference opt_insert_update_list | INSERT_SYM insert_lock_option opt_ignore opt_INTO table_ident opt_use_partition insert_query_expression opt_insert_update_list
replace_stmt ::= REPLACE_SYM replace_lock_option opt_INTO table_ident opt_use_partition insert_from_constructor | REPLACE_SYM replace_lock_option opt_INTO table_ident opt_use_partition SET_SYM update_list | REPLACE_SYM replace_lock_option opt_INTO table_ident opt_use_partition insert_query_expression
insert_lock_option ::= | LOW_PRIORITY | DELAYED_SYM | HIGH_PRIORITY
replace_lock_option ::= opt_low_priority | DELAYED_SYM
opt_INTO ::= /*empty*/ | INTO
insert_from_constructor ::= insert_values | '(' ')' insert_values | '(' fields ')' insert_values
insert_query_expression ::= query_expression_or_parens | '(' ')' query_expression_or_parens | '(' fields ')' query_expression_or_parens
fields ::= fields ',' insert_ident | insert_ident
insert_values ::= value_or_values values_list
query_expression_or_parens ::= query_expression | query_expression locking_clause_list | query_expression_parens
value_or_values ::= VALUE_SYM | VALUES
values_list ::= values_list ',' row_value | row_value
values_row_list ::= values_row_list ',' row_value_explicit | row_value_explicit
equal ::= EQ | SET_VAR
opt_equal ::= /*empty*/ | equal
row_value ::= '(' opt_values ')'
row_value_explicit ::= ROW_SYM '(' opt_values ')'
opt_values ::= | values
values ::= values ',' expr_or_default | expr_or_default
expr_or_default ::= expr | DEFAULT_SYM
opt_values_reference ::= | AS ident opt_derived_column_list
opt_insert_update_list ::= | ON_SYM DUPLICATE_SYM KEY_SYM UPDATE_SYM update_list
update_stmt ::= opt_with_clause UPDATE_SYM opt_low_priority opt_ignore table_reference_list SET_SYM update_list opt_where_clause opt_order_clause opt_simple_limit
opt_with_clause ::= | with_clause
update_list ::= update_list ',' update_elem | update_elem
update_elem ::= simple_ident_nospvar equal expr_or_default
opt_low_priority ::= | LOW_PRIORITY
delete_stmt ::= opt_with_clause DELETE_SYM opt_delete_options FROM table_ident opt_table_alias opt_use_partition opt_where_clause opt_order_clause opt_simple_limit | opt_with_clause DELETE_SYM opt_delete_options table_alias_ref_list FROM table_reference_list opt_where_clause | opt_with_clause DELETE_SYM opt_delete_options FROM table_alias_ref_list USING table_reference_list opt_where_clause
opt_wild ::= /*empty*/ | '.' '*'
opt_delete_options ::= | opt_delete_option opt_delete_options
opt_delete_option ::= QUICK | LOW_PRIORITY | IGNORE_SYM
truncate_stmt ::= TRUNCATE_SYM opt_table table_ident
opt_table ::= /*empty*/ | TABLE_SYM
opt_profile_defs ::= | profile_defs
profile_defs ::= profile_def | profile_defs ',' profile_def
profile_def ::= CPU_SYM | MEMORY_SYM | BLOCK_SYM IO_SYM | CONTEXT_SYM SWITCHES_SYM | PAGE_SYM FAULTS_SYM | IPC_SYM | SWAPS_SYM | SOURCE_SYM | ALL
opt_for_query ::= | FOR_SYM QUERY_SYM NUM
show_databases_stmt ::= SHOW DATABASES opt_wild_or_where
show_tables_stmt ::= SHOW opt_show_cmd_type TABLES opt_db opt_wild_or_where
show_triggers_stmt ::= SHOW opt_full TRIGGERS_SYM opt_db opt_wild_or_where
show_events_stmt ::= SHOW EVENTS_SYM opt_db opt_wild_or_where
show_table_status_stmt ::= SHOW TABLE_SYM STATUS_SYM opt_db opt_wild_or_where
show_open_tables_stmt ::= SHOW OPEN_SYM TABLES opt_db opt_wild_or_where
show_plugins_stmt ::= SHOW PLUGINS_SYM
show_engine_logs_stmt ::= SHOW ENGINE_SYM engine_or_all LOGS_SYM
show_engine_mutex_stmt ::= SHOW ENGINE_SYM engine_or_all MUTEX_SYM
show_engine_status_stmt ::= SHOW ENGINE_SYM engine_or_all STATUS_SYM
show_columns_stmt ::= SHOW opt_show_cmd_type COLUMNS from_or_in table_ident opt_db opt_wild_or_where
show_binary_logs_stmt ::= SHOW master_or_binary LOGS_SYM
show_replicas_stmt ::= SHOW SLAVE HOSTS_SYM | SHOW REPLICAS_SYM
show_binlog_events_stmt ::= SHOW BINLOG_SYM EVENTS_SYM opt_binlog_in binlog_from opt_limit_clause
show_relaylog_events_stmt ::= SHOW RELAYLOG_SYM EVENTS_SYM opt_binlog_in binlog_from opt_limit_clause opt_channel
show_keys_stmt ::= SHOW opt_extended keys_or_index from_or_in table_ident opt_db opt_where_clause
show_engines_stmt ::= SHOW opt_storage ENGINES_SYM
show_count_warnings_stmt ::= SHOW COUNT_SYM '(' '*' ')' WARNINGS
show_count_errors_stmt ::= SHOW COUNT_SYM '(' '*' ')' ERRORS
show_warnings_stmt ::= SHOW WARNINGS opt_limit_clause
show_errors_stmt ::= SHOW ERRORS opt_limit_clause
show_profiles_stmt ::= SHOW PROFILES_SYM
show_profile_stmt ::= SHOW PROFILE_SYM opt_profile_defs opt_for_query opt_limit_clause
show_status_stmt ::= SHOW opt_var_type STATUS_SYM opt_wild_or_where
show_processlist_stmt ::= SHOW opt_full PROCESSLIST_SYM
show_variables_stmt ::= SHOW opt_var_type VARIABLES opt_wild_or_where
show_character_set_stmt ::= SHOW character_set opt_wild_or_where
show_collation_stmt ::= SHOW COLLATION_SYM opt_wild_or_where
show_privileges_stmt ::= SHOW PRIVILEGES
show_grants_stmt ::= SHOW GRANTS | SHOW GRANTS FOR_SYM user | SHOW GRANTS FOR_SYM user USING user_list | SHOW EFFECTIVE_SYM GRANTS | SHOW EFFECTIVE_SYM GRANTS FOR_SYM user | SHOW EFFECTIVE_SYM GRANTS FOR_SYM user USING user_list
show_create_database_stmt ::= SHOW CREATE DATABASE opt_if_not_exists ident
show_create_table_stmt ::= SHOW CREATE TABLE_SYM table_ident
show_create_view_stmt ::= SHOW CREATE VIEW_SYM table_ident
show_master_status_stmt ::= SHOW MASTER_SYM STATUS_SYM
show_replica_status_stmt ::= SHOW replica STATUS_SYM opt_channel
show_stats_stmt ::= SHOW CLIENT_STATS_SYM opt_wild_or_where | SHOW USER_STATS_SYM opt_wild_or_where | SHOW THREAD_STATS_SYM opt_wild_or_where | SHOW TABLE_STATS_SYM opt_wild_or_where | SHOW INDEX_STATS_SYM opt_wild_or_where
show_create_procedure_stmt ::= SHOW CREATE PROCEDURE_SYM sp_name
show_create_function_stmt ::= SHOW CREATE FUNCTION_SYM sp_name
show_create_trigger_stmt ::= SHOW CREATE TRIGGER_SYM sp_name
show_procedure_status_stmt ::= SHOW PROCEDURE_SYM STATUS_SYM opt_wild_or_where
show_function_status_stmt ::= SHOW FUNCTION_SYM STATUS_SYM opt_wild_or_where
show_procedure_code_stmt ::= SHOW PROCEDURE_SYM CODE_SYM sp_name
show_function_code_stmt ::= SHOW FUNCTION_SYM CODE_SYM sp_name
show_create_event_stmt ::= SHOW CREATE EVENT_SYM sp_name
show_create_user_stmt ::= SHOW CREATE USER user
engine_or_all ::= ident_or_text | ALL
master_or_binary ::= MASTER_SYM | BINARY_SYM
opt_storage ::= /*empty*/ | STORAGE_SYM
opt_db ::= | from_or_in ident
opt_full ::= | FULL
opt_extended ::= | EXTENDED_SYM
opt_show_cmd_type ::= | FULL | EXTENDED_SYM | EXTENDED_SYM FULL
from_or_in ::= FROM | IN_SYM
opt_binlog_in ::= | IN_SYM TEXT_STRING_sys
binlog_from ::= | FROM ulonglong_num
opt_wild_or_where ::= | LIKE TEXT_STRING_literal | where_clause
describe_stmt ::= describe_command table_ident opt_describe_column
explain_stmt ::= describe_command opt_explain_analyze_type explainable_stmt
explainable_stmt ::= select_stmt | insert_stmt | replace_stmt | update_stmt | delete_stmt | FOR_SYM CONNECTION_SYM real_ulong_num
describe_command ::= DESC | DESCRIBE
opt_explain_format_type ::= | FORMAT_SYM EQ ident_or_text
opt_explain_analyze_type ::= ANALYZE_SYM opt_explain_format_type | opt_explain_format_type
opt_describe_column ::= | text_string | ident
flush ::= FLUSH_SYM opt_no_write_to_binlog flush_options
flush_options ::= table_or_tables opt_table_list opt_flush_lock | flush_options_list
opt_flush_lock ::= | WITH READ_SYM LOCK_SYM | FOR_SYM EXPORT_SYM
flush_options_list ::= flush_options_list ',' flush_option | flush_option
flush_option ::= ERROR_SYM LOGS_SYM | ENGINE_SYM LOGS_SYM | GENERAL LOGS_SYM | SLOW LOGS_SYM | BINARY_SYM LOGS_SYM | RELAY LOGS_SYM opt_channel | HOSTS_SYM | PRIVILEGES | LOGS_SYM | STATUS_SYM | CLIENT_STATS_SYM | USER_STATS_SYM | THREAD_STATS_SYM | TABLE_STATS_SYM | INDEX_STATS_SYM | RESOURCES | OPTIMIZER_COSTS_SYM | CHANGED_PAGE_BITMAPS_SYM | MEMORY_SYM PROFILE_SYM
opt_table_list ::= | table_list
reset ::= RESET_SYM reset_options | RESET_SYM PERSIST_SYM opt_if_exists_ident
reset_options ::= reset_options ',' reset_option | reset_option
opt_if_exists_ident ::= | if_exists ident
reset_option ::= SLAVE opt_replica_reset_options opt_channel | REPLICA_SYM opt_replica_reset_options opt_channel | MASTER_SYM source_reset_options | CHANGED_PAGE_BITMAPS_SYM
opt_replica_reset_options ::= | ALL
source_reset_options ::= | TO_SYM real_ulonglong_num
purge ::= PURGE purge_options
purge_options ::= master_or_binary LOGS_SYM purge_option | CHANGED_PAGE_BITMAPS_SYM BEFORE_SYM real_ulonglong_num
purge_option ::= TO_SYM TEXT_STRING_sys | BEFORE_SYM expr
kill ::= KILL_SYM kill_option expr
kill_option ::= | CONNECTION_SYM | QUERY_SYM
use ::= USE_SYM ident
load_stmt ::= LOAD data_or_xml load_data_lock opt_local INFILE TEXT_STRING_filesystem opt_duplicate INTO TABLE_SYM table_ident opt_use_partition opt_load_data_charset opt_xml_rows_identified_by opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec opt_load_data_set_spec
data_or_xml ::= DATA_SYM | XML_SYM
opt_local ::= | LOCAL_SYM
load_data_lock ::= | CONCURRENT | LOW_PRIORITY
opt_duplicate ::= | duplicate
duplicate ::= REPLACE_SYM | IGNORE_SYM
opt_field_term ::= | COLUMNS field_term_list
field_term_list ::= field_term_list field_term | field_term
field_term ::= TERMINATED BY text_string | OPTIONALLY ENCLOSED BY text_string | ENCLOSED BY text_string | ESCAPED BY text_string
opt_line_term ::= | LINES line_term_list
line_term_list ::= line_term_list line_term | line_term
line_term ::= TERMINATED BY text_string | STARTING BY text_string
opt_xml_rows_identified_by ::= | ROWS_SYM IDENTIFIED_SYM BY text_string
opt_ignore_lines ::= | IGNORE_SYM NUM lines_or_rows
lines_or_rows ::= LINES | ROWS_SYM
opt_field_or_var_spec ::= | '(' fields_or_vars ')' | '(' ')'
fields_or_vars ::= fields_or_vars ',' field_or_var | field_or_var
field_or_var ::= simple_ident_nospvar | '@' ident_or_text
opt_load_data_set_spec ::= | SET_SYM load_data_set_list
load_data_set_list ::= load_data_set_list ',' load_data_set_elem | load_data_set_elem
load_data_set_elem ::= simple_ident_nospvar equal expr_or_default
text_literal ::= TEXT_STRING | NCHAR_STRING | UNDERSCORE_CHARSET TEXT_STRING | text_literal TEXT_STRING_literal
text_string ::= TEXT_STRING_literal | HEX_NUM | BIN_NUM
param_marker ::= PARAM_MARKER
signed_literal ::= literal | '+' NUM_literal | '-' NUM_literal
signed_literal_or_null ::= signed_literal | null_as_literal
null_as_literal ::= NULL_SYM
literal ::= text_literal | NUM_literal | temporal_literal | FALSE_SYM | TRUE_SYM | HEX_NUM | BIN_NUM | UNDERSCORE_CHARSET HEX_NUM | UNDERSCORE_CHARSET BIN_NUM
literal_or_null ::= literal | null_as_literal
NUM_literal ::= int64_literal | DECIMAL_NUM | FLOAT_NUM
int64_literal ::= NUM | LONG_NUM | ULONGLONG_NUM
temporal_literal ::= DATE_SYM TEXT_STRING | TIME_SYM TEXT_STRING | TIMESTAMP_SYM TEXT_STRING
opt_interval ::= | INTERVAL_SYM
insert_ident ::= simple_ident_nospvar | table_wild
table_wild ::= ident '.' '*' | ident '.' ident '.' '*'
order_expr ::= expr opt_ordering_direction
grouping_expr ::= expr
simple_ident ::= ident | simple_ident_q
simple_ident_nospvar ::= ident | simple_ident_q
simple_ident_q ::= ident '.' ident | ident '.' ident '.' ident
table_ident ::= ident | ident '.' ident
table_ident_opt_wild ::= ident opt_wild | ident '.' ident opt_wild
IDENT_sys ::= IDENT | IDENT_QUOTED
TEXT_STRING_sys_nonewline ::= TEXT_STRING_sys
filter_wild_db_table_string ::= TEXT_STRING_sys_nonewline
TEXT_STRING_sys ::= TEXT_STRING
TEXT_STRING_literal ::= TEXT_STRING
TEXT_STRING_filesystem ::= TEXT_STRING
TEXT_STRING_password ::= TEXT_STRING
TEXT_STRING_hash ::= TEXT_STRING_sys | HEX_NUM
TEXT_STRING_validated ::= TEXT_STRING
ident ::= IDENT_sys | ident_keyword
role_ident ::= IDENT_sys | role_keyword
label_ident ::= IDENT_sys | label_keyword
lvalue_ident ::= IDENT_sys | lvalue_keyword
ident_or_text ::= ident | TEXT_STRING_sys | LEX_HOSTNAME
role_ident_or_text ::= role_ident | TEXT_STRING_sys | LEX_HOSTNAME
user_ident_or_text ::= ident_or_text | ident_or_text '@' ident_or_text
user ::= user_ident_or_text | CURRENT_USER optional_braces
role ::= role_ident_or_text | role_ident_or_text '@' ident_or_text
schema ::= ident
ident_keyword ::= ident_keywords_unambiguous | ident_keywords_ambiguous_1_roles_and_labels | ident_keywords_ambiguous_2_labels | ident_keywords_ambiguous_3_roles | ident_keywords_ambiguous_4_system_variables
ident_keywords_ambiguous_1_roles_and_labels ::= EXECUTE_SYM | RESTART_SYM | SHUTDOWN
ident_keywords_ambiguous_2_labels ::= ASCII_SYM | BEGIN_SYM | BYTE_SYM | CACHE_SYM | CHARSET | CHECKSUM_SYM | CLONE_SYM | COMMENT_SYM | COMMIT_SYM | COMPRESSION_DICTIONARY_SYM | CONTAINS_SYM | DEALLOCATE_SYM | DO_SYM | END | FLUSH_SYM | FOLLOWS_SYM | HANDLER_SYM | HELP_SYM | IMPORT | INSTALL_SYM | LANGUAGE_SYM | NO_SYM | PRECEDES_SYM | PREPARE_SYM | REPAIR | RESET_SYM | ROLLBACK_SYM | SAVEPOINT_SYM | SIGNED_SYM | SLAVE | START_SYM | STOP_SYM | TRUNCATE_SYM | UNICODE_SYM | UNINSTALL_SYM | XA_SYM
label_keyword ::= ident_keywords_unambiguous | ident_keywords_ambiguous_3_roles | ident_keywords_ambiguous_4_system_variables
ident_keywords_ambiguous_3_roles ::= EVENT_SYM | FILE_SYM | NONE_SYM | PROCESS | PROXY_SYM | RELOAD | REPLICATION | RESOURCE_SYM | SUPER_SYM
ident_keywords_unambiguous ::= ACTION | ACCOUNT_SYM | ACTIVE_SYM | ADDDATE_SYM | ADMIN_SYM | AFTER_SYM | AGAINST | AGGREGATE_SYM | ALGORITHM_SYM | ALWAYS_SYM | ANY_SYM | ARRAY_SYM | AT_SYM | ATTRIBUTE_SYM | AUTOEXTEND_SIZE_SYM | AUTO_INC | AVG_ROW_LENGTH | AVG_SYM | BACKUP_SYM | BINLOG_SYM | BIT_SYM | BLOCK_SYM | BOOLEAN_SYM | BOOL_SYM | BTREE_SYM | BUCKETS_SYM | CASCADED | CATALOG_NAME_SYM | CHAIN_SYM | CHANGED | CHANGED_PAGE_BITMAPS_SYM | CHANNEL_SYM | CIPHER_SYM | CLASS_ORIGIN_SYM | CLIENT_SYM | CLIENT_STATS_SYM | CLOSE_SYM | COALESCE | CODE_SYM | COLLATION_SYM | COLUMNS | COLUMN_FORMAT_SYM | COLUMN_NAME_SYM | COMMITTED_SYM | COMPACT_SYM | COMPLETION_SYM | COMPONENT_SYM | COMPRESSED_SYM | COMPRESSION_SYM | CONCURRENT | CONNECTION_SYM | CONSISTENT_SYM | CONSTRAINT_CATALOG_SYM | CONSTRAINT_NAME_SYM | CONSTRAINT_SCHEMA_SYM | CONTEXT_SYM | CPU_SYM | CURRENT_SYM | CURSOR_NAME_SYM | DATAFILE_SYM | DATA_SYM | DATETIME_SYM | DATE_SYM | DAY_SYM | DEFAULT_AUTH_SYM | DEFINER_SYM | DEFINITION_SYM | DELAY_KEY_WRITE_SYM | DESCRIPTION_SYM | DIAGNOSTICS_SYM | DIRECTORY_SYM | DISABLE_SYM | DISCARD_SYM | DISK_SYM | DUMPFILE | DUPLICATE_SYM | DYNAMIC_SYM | EFFECTIVE_SYM | ENABLE_SYM | ENCRYPTION_KEY_ID_SYM | ENCRYPTION_SYM | ENDS_SYM | ENFORCED_SYM | ENGINES_SYM | ENGINE_SYM | ENGINE_ATTRIBUTE_SYM | ENUM_SYM | ERRORS | ERROR_SYM | ESCAPE_SYM | EVENTS_SYM | EVERY_SYM | EXCHANGE_SYM | EXCLUDE_SYM | EXPANSION_SYM | EXPIRE_SYM | EXPORT_SYM | EXTENDED_SYM | EXTENT_SIZE_SYM | FAILED_LOGIN_ATTEMPTS_SYM | FAST_SYM | FAULTS_SYM | FILE_BLOCK_SIZE_SYM | FILTER_SYM | FIRST_SYM | FIXED_SYM | FOLLOWING_SYM | FORMAT_SYM | FOUND_SYM | FULL | GENERAL | GEOMETRYCOLLECTION_SYM | GEOMETRY_SYM | GET_FORMAT | GET_MASTER_PUBLIC_KEY_SYM | GET_SOURCE_PUBLIC_KEY_SYM | GRANTS | GROUP_REPLICATION | HASH_SYM | HISTOGRAM_SYM | HISTORY_SYM | HOSTS_SYM | HOST_SYM | HOUR_SYM | IDENTIFIED_SYM | IGNORE_SERVER_IDS_SYM | INACTIVE_SYM | INDEX_STATS_SYM | INDEXES | INITIAL_SIZE_SYM | INSERT_METHOD | INSTANCE_SYM | INVISIBLE_SYM | INVOKER_SYM | IO_SYM | IPC_SYM | ISOLATION | ISSUER_SYM | JSON_SYM | JSON_VALUE_SYM | KEY_BLOCK_SIZE | LAST_SYM | LEAVES | LESS_SYM | LEVEL_SYM | LINESTRING_SYM | LIST_SYM | LOCKED_SYM | LOCKS_SYM | LOGFILE_SYM | LOGS_SYM | MASTER_AUTO_POSITION_SYM | MASTER_COMPRESSION_ALGORITHM_SYM | MASTER_CONNECT_RETRY_SYM | MASTER_DELAY_SYM | MASTER_HEARTBEAT_PERIOD_SYM | MASTER_HOST_SYM | NETWORK_NAMESPACE_SYM | MASTER_LOG_FILE_SYM | MASTER_LOG_POS_SYM | MASTER_PASSWORD_SYM | MASTER_PORT_SYM | MASTER_PUBLIC_KEY_PATH_SYM | MASTER_RETRY_COUNT_SYM | MASTER_SSL_CAPATH_SYM | MASTER_SSL_CA_SYM | MASTER_SSL_CERT_SYM | MASTER_SSL_CIPHER_SYM | MASTER_SSL_CRLPATH_SYM | MASTER_SSL_CRL_SYM | MASTER_SSL_KEY_SYM | MASTER_SSL_SYM | MASTER_SYM | MASTER_TLS_CIPHERSUITES_SYM | MASTER_TLS_VERSION_SYM | MASTER_USER_SYM | MASTER_ZSTD_COMPRESSION_LEVEL_SYM | MAX_CONNECTIONS_PER_HOUR | MAX_QUERIES_PER_HOUR | MAX_ROWS | MAX_SIZE_SYM | MAX_UPDATES_PER_HOUR | MAX_USER_CONNECTIONS_SYM | MEDIUM_SYM | MEMBER_SYM | MEMORY_SYM | MERGE_SYM | MESSAGE_TEXT_SYM | MICROSECOND_SYM | MIGRATE_SYM | MINUTE_SYM | MIN_ROWS | MODE_SYM | MODIFY_SYM | MONTH_SYM | MULTILINESTRING_SYM | MULTIPOINT_SYM | MULTIPOLYGON_SYM | MUTEX_SYM | MYSQL_ERRNO_SYM | NAMES_SYM | NAME_SYM | NATIONAL_SYM | NCHAR_SYM | NDBCLUSTER_SYM | NESTED_SYM | NEVER_SYM | NEW_SYM | NEXT_SYM | NODEGROUP_SYM | NOWAIT_SYM | NO_WAIT_SYM | NULLS_SYM | NUMBER_SYM | NVARCHAR_SYM | OFF_SYM | OFFSET_SYM | OJ_SYM | OLD_SYM | ONE_SYM | ONLY_SYM | OPEN_SYM | OPTIONAL_SYM | OPTIONS_SYM | ORDINALITY_SYM | ORGANIZATION_SYM | OTHERS_SYM | OWNER_SYM | PACK_KEYS_SYM | PAGE_SYM | PARSER_SYM | PARTIAL | PARTITIONING_SYM | PARTITIONS_SYM | PASSWORD | PASSWORD_LOCK_TIME_SYM | PATH_SYM | PHASE_SYM | PLUGINS_SYM | PLUGIN_DIR_SYM | PLUGIN_SYM | POINT_SYM | POLYGON_SYM | PORT_SYM | PRECEDING_SYM | PRESERVE_SYM | PREV_SYM | PRIVILEGES | PRIVILEGE_CHECKS_USER_SYM | PROCESSLIST_SYM | PROFILES_SYM | PROFILE_SYM | QUARTER_SYM | QUERY_SYM | QUICK | RANDOM_SYM | READ_ONLY_SYM | REBUILD_SYM | RECOVER_SYM | REDO_BUFFER_SIZE_SYM | REDUNDANT_SYM | REFERENCE_SYM | RELAY | RELAYLOG_SYM | RELAY_LOG_FILE_SYM | RELAY_LOG_POS_SYM | RELAY_THREAD | REMOVE_SYM | ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_SYM | REORGANIZE_SYM | REPEATABLE_SYM | REPLICAS_SYM | REPLICATE_DO_DB | REPLICATE_DO_TABLE | REPLICATE_IGNORE_DB | REPLICATE_IGNORE_TABLE | REPLICATE_REWRITE_DB | REPLICATE_WILD_DO_TABLE | REPLICATE_WILD_IGNORE_TABLE | REPLICA_SYM | REQUIRE_ROW_FORMAT_SYM | REQUIRE_TABLE_PRIMARY_KEY_CHECK_SYM | RESOURCES | RESPECT_SYM | RESTORE_SYM | RESUME_SYM | RETAIN_SYM | RETURNED_SQLSTATE_SYM | RETURNING_SYM | RETURNS_SYM | REUSE_SYM | REVERSE_SYM | ROLE_SYM | ROLLUP_SYM | ROTATE_SYM | ROUTINE_SYM | ROW_COUNT_SYM | ROW_FORMAT_SYM | RTREE_SYM | SCHEDULE_SYM | SCHEMA_NAME_SYM | SECONDARY_ENGINE_SYM | SECONDARY_ENGINE_ATTRIBUTE_SYM | SECONDARY_LOAD_SYM | SECONDARY_SYM | SECONDARY_UNLOAD_SYM | SECOND_SYM | SECURITY_SYM | SERIALIZABLE_SYM | SERIAL_SYM | SERVER_SYM | SHARE_SYM | SIMPLE_SYM | SKIP_SYM | SLOW | SNAPSHOT_SYM | SOCKET_SYM | SONAME_SYM | SOUNDS_SYM | SOURCE_AUTO_POSITION_SYM | SOURCE_BIND_SYM | SOURCE_COMPRESSION_ALGORITHM_SYM | SOURCE_CONNECTION_AUTO_FAILOVER_SYM | SOURCE_CONNECT_RETRY_SYM | SOURCE_DELAY_SYM | SOURCE_HEARTBEAT_PERIOD_SYM | SOURCE_HOST_SYM | SOURCE_LOG_FILE_SYM | SOURCE_LOG_POS_SYM | SOURCE_PASSWORD_SYM | SOURCE_PORT_SYM | SOURCE_PUBLIC_KEY_PATH_SYM | SOURCE_RETRY_COUNT_SYM | SOURCE_SSL_CAPATH_SYM | SOURCE_SSL_CA_SYM | SOURCE_SSL_CERT_SYM | SOURCE_SSL_CIPHER_SYM | SOURCE_SSL_CRLPATH_SYM | SOURCE_SSL_CRL_SYM | SOURCE_SSL_KEY_SYM | SOURCE_SSL_SYM | SOURCE_SSL_VERIFY_SERVER_CERT_SYM | SOURCE_SYM | SOURCE_TLS_CIPHERSUITES_SYM | SOURCE_TLS_VERSION_SYM | SOURCE_USER_SYM | SOURCE_ZSTD_COMPRESSION_LEVEL_SYM | SQL_AFTER_GTIDS | SQL_AFTER_MTS_GAPS | SQL_BEFORE_GTIDS | SQL_BUFFER_RESULT | SQL_NO_CACHE_SYM | SQL_THREAD | SRID_SYM | STACKED_SYM | STARTS_SYM | STATS_AUTO_RECALC_SYM | STATS_PERSISTENT_SYM | STATS_SAMPLE_PAGES_SYM | STATUS_SYM | STORAGE_SYM | STREAM_SYM | STRING_SYM | SUBCLASS_ORIGIN_SYM | SUBDATE_SYM | SUBJECT_SYM | SUBPARTITIONS_SYM | SUBPARTITION_SYM | SUSPEND_SYM | SWAPS_SYM | SWITCHES_SYM | TABLES | TABLESPACE_SYM | TABLE_CHECKSUM_SYM | TABLE_NAME_SYM | TABLE_STATS_SYM | TEMPORARY | TEMPTABLE_SYM | TEXT_SYM | THAN_SYM | THREAD_PRIORITY_SYM | THREAD_STATS_SYM | TIES_SYM | TIMESTAMP_ADD | TIMESTAMP_DIFF | TIMESTAMP_SYM | TIME_SYM | TLS_SYM | TRANSACTION_SYM | TRIGGERS_SYM | TYPES_SYM | TYPE_SYM | UNBOUNDED_SYM | UNCOMMITTED_SYM | UNDEFINED_SYM | UNDOFILE_SYM | UNDO_BUFFER_SIZE_SYM | UNKNOWN_SYM | UNTIL_SYM | UPGRADE_SYM | USER | USER_STATS_SYM | USE_FRM | VALIDATION_SYM | VALUE_SYM | VARIABLES | VCPU_SYM | VIEW_SYM | VISIBLE_SYM | WAIT_SYM | WARNINGS | WEEK_SYM | WEIGHT_STRING_SYM | WITHOUT_SYM | WORK_SYM | WRAPPER_SYM | X509_SYM | XID_SYM | XML_SYM | YEAR_SYM | ZONE_SYM
role_keyword ::= ident_keywords_unambiguous | ident_keywords_ambiguous_2_labels | ident_keywords_ambiguous_4_system_variables
lvalue_keyword ::= ident_keywords_unambiguous | ident_keywords_ambiguous_1_roles_and_labels | ident_keywords_ambiguous_2_labels | ident_keywords_ambiguous_3_roles
ident_keywords_ambiguous_4_system_variables ::= GLOBAL_SYM | LOCAL_SYM | PERSIST_SYM | PERSIST_ONLY_SYM | SESSION_SYM
set ::= SET_SYM start_option_value_list
start_option_value_list ::= option_value_no_option_type option_value_list_continued | TRANSACTION_SYM transaction_characteristics | option_type start_option_value_list_following_option_type | PASSWORD equal TEXT_STRING_password opt_replace_password opt_retain_current_password | PASSWORD TO_SYM RANDOM_SYM opt_replace_password opt_retain_current_password | PASSWORD FOR_SYM user equal TEXT_STRING_password opt_replace_password opt_retain_current_password | PASSWORD FOR_SYM user TO_SYM RANDOM_SYM opt_replace_password opt_retain_current_password
set_role_stmt ::= SET_SYM ROLE_SYM role_list | SET_SYM ROLE_SYM NONE_SYM | SET_SYM ROLE_SYM DEFAULT_SYM | SET_SYM DEFAULT_SYM ROLE_SYM role_list TO_SYM role_list | SET_SYM DEFAULT_SYM ROLE_SYM NONE_SYM TO_SYM role_list | SET_SYM DEFAULT_SYM ROLE_SYM ALL TO_SYM role_list | SET_SYM ROLE_SYM ALL opt_except_role_list
opt_except_role_list ::= | EXCEPT_SYM role_list
set_resource_group_stmt ::= SET_SYM RESOURCE_SYM GROUP_SYM ident | SET_SYM RESOURCE_SYM GROUP_SYM ident FOR_SYM thread_id_list_options
thread_id_list ::= real_ulong_num | thread_id_list opt_comma real_ulong_num
thread_id_list_options ::= thread_id_list
start_option_value_list_following_option_type ::= option_value_following_option_type option_value_list_continued | TRANSACTION_SYM transaction_characteristics
option_value_list_continued ::= | ',' option_value_list
option_value_list ::= option_value | option_value_list ',' option_value
option_value ::= option_type option_value_following_option_type | option_value_no_option_type
option_type ::= GLOBAL_SYM | PERSIST_SYM | PERSIST_ONLY_SYM | LOCAL_SYM | SESSION_SYM
opt_var_type ::= | GLOBAL_SYM | LOCAL_SYM | SESSION_SYM
opt_var_ident_type ::= | GLOBAL_SYM '.' | LOCAL_SYM '.' | SESSION_SYM '.'
opt_set_var_ident_type ::= | PERSIST_SYM '.' | PERSIST_ONLY_SYM '.' | GLOBAL_SYM '.' | LOCAL_SYM '.' | SESSION_SYM '.'
option_value_following_option_type ::= internal_variable_name equal set_expr_or_default
option_value_no_option_type ::= internal_variable_name equal set_expr_or_default | '@' ident_or_text equal expr | '@' '@' opt_set_var_ident_type internal_variable_name equal set_expr_or_default | character_set old_or_new_charset_name_or_default | NAMES_SYM equal expr | NAMES_SYM charset_name opt_collate | NAMES_SYM DEFAULT_SYM
internal_variable_name ::= lvalue_ident | lvalue_ident '.' ident | DEFAULT_SYM '.' ident
transaction_characteristics ::= transaction_access_mode opt_isolation_level | isolation_level opt_transaction_access_mode
transaction_access_mode ::= transaction_access_mode_types
opt_transaction_access_mode ::= | ',' transaction_access_mode
isolation_level ::= ISOLATION LEVEL_SYM isolation_types
opt_isolation_level ::= | ',' isolation_level
transaction_access_mode_types ::= READ_SYM ONLY_SYM | READ_SYM WRITE_SYM
isolation_types ::= READ_SYM UNCOMMITTED_SYM | READ_SYM COMMITTED_SYM | REPEATABLE_SYM READ_SYM | SERIALIZABLE_SYM
set_expr_or_default ::= expr | DEFAULT_SYM | ON_SYM | ALL | BINARY_SYM | ROW_SYM | SYSTEM_SYM | FORCE_SYM
lock ::= LOCK_SYM lock_variant
lock_variant ::= TABLES FOR_SYM BACKUP_SYM | table_or_tables table_lock_list | INSTANCE_SYM FOR_SYM BACKUP_SYM
table_or_tables ::= TABLE_SYM | TABLES
table_lock_list ::= table_lock | table_lock_list ',' table_lock
table_lock ::= table_ident opt_table_alias lock_option
lock_option ::= READ_SYM | WRITE_SYM | LOW_PRIORITY WRITE_SYM | READ_SYM LOCAL_SYM
unlock ::= UNLOCK_SYM unlock_variant
unlock_variant ::= INSTANCE_SYM | table_or_tables
shutdown_stmt ::= SHUTDOWN
restart_server_stmt ::= RESTART_SYM
alter_instance_stmt ::= ALTER INSTANCE_SYM alter_instance_action
alter_instance_action ::= ROTATE_SYM ident_or_text MASTER_SYM KEY_SYM | ROTATE_SYM ident_or_text SYSTEM_SYM KEY_SYM ulong_num | ROTATE_SYM ident_or_text SYSTEM_SYM KEY_SYM | RELOAD TLS_SYM | RELOAD TLS_SYM NO_SYM ROLLBACK_SYM ON_SYM ERROR_SYM | RELOAD TLS_SYM FOR_SYM CHANNEL_SYM ident | RELOAD TLS_SYM FOR_SYM CHANNEL_SYM ident NO_SYM ROLLBACK_SYM ON_SYM ERROR_SYM | ENABLE_SYM ident ident | DISABLE_SYM ident ident
handler_stmt ::= HANDLER_SYM table_ident OPEN_SYM opt_table_alias | HANDLER_SYM ident CLOSE_SYM | HANDLER_SYM ident READ_SYM handler_scan_function opt_where_clause opt_limit_clause | HANDLER_SYM ident READ_SYM ident handler_rkey_function opt_where_clause opt_limit_clause | HANDLER_SYM ident READ_SYM ident handler_rkey_mode '(' values ')' opt_where_clause opt_limit_clause
handler_scan_function ::= FIRST_SYM | NEXT_SYM
handler_rkey_function ::= FIRST_SYM | NEXT_SYM | PREV_SYM | LAST_SYM
handler_rkey_mode ::= EQ | GE | LE | GT_SYM | LT
revoke ::= REVOKE role_or_privilege_list FROM user_list | REVOKE role_or_privilege_list ON_SYM opt_acl_type grant_ident FROM user_list | REVOKE ALL opt_privileges ON_SYM opt_acl_type grant_ident FROM user_list | REVOKE ALL opt_privileges ',' GRANT OPTION FROM user_list | REVOKE PROXY_SYM ON_SYM user FROM user_list
grant ::= GRANT role_or_privilege_list TO_SYM user_list opt_with_admin_option | GRANT role_or_privilege_list ON_SYM opt_acl_type grant_ident TO_SYM user_list grant_options opt_grant_as | GRANT ALL opt_privileges ON_SYM opt_acl_type grant_ident TO_SYM user_list grant_options opt_grant_as | GRANT PROXY_SYM ON_SYM user TO_SYM user_list opt_grant_option
opt_acl_type ::= | TABLE_SYM | FUNCTION_SYM | PROCEDURE_SYM
opt_privileges ::= /*empty*/ | PRIVILEGES
role_or_privilege_list ::= role_or_privilege | role_or_privilege_list ',' role_or_privilege
role_or_privilege ::= role_ident_or_text opt_column_list | role_ident_or_text '@' ident_or_text | SELECT_SYM opt_column_list | INSERT_SYM opt_column_list | UPDATE_SYM opt_column_list | REFERENCES opt_column_list | DELETE_SYM | USAGE | INDEX_SYM | ALTER | CREATE | DROP | EXECUTE_SYM | RELOAD | SHUTDOWN | PROCESS | FILE_SYM | GRANT OPTION | SHOW DATABASES | SUPER_SYM | CREATE TEMPORARY TABLES | LOCK_SYM TABLES | REPLICATION SLAVE | REPLICATION CLIENT_SYM | CREATE VIEW_SYM | SHOW VIEW_SYM | CREATE ROUTINE_SYM | ALTER ROUTINE_SYM | CREATE USER | EVENT_SYM | TRIGGER_SYM | CREATE TABLESPACE_SYM | CREATE ROLE_SYM | DROP ROLE_SYM
opt_with_admin_option ::= | WITH ADMIN_SYM OPTION
opt_and ::= /*empty*/ | AND_SYM
require_list ::= require_list_element opt_and require_list | require_list_element
require_list_element ::= SUBJECT_SYM TEXT_STRING | ISSUER_SYM TEXT_STRING | CIPHER_SYM TEXT_STRING
grant_ident ::= '*' | schema '.' '*' | '*' '.' '*' | ident | schema '.' ident
user_list ::= user | user_list ',' user
role_list ::= role | role_list ',' role
opt_retain_current_password ::= | RETAIN_SYM CURRENT_SYM PASSWORD
opt_discard_old_password ::= | DISCARD_SYM OLD_SYM PASSWORD
create_user ::= user IDENTIFIED_SYM BY TEXT_STRING_password | user IDENTIFIED_SYM BY RANDOM_SYM PASSWORD | user IDENTIFIED_SYM WITH ident_or_text | user IDENTIFIED_SYM WITH ident_or_text AS TEXT_STRING_hash | user IDENTIFIED_SYM WITH ident_or_text BY TEXT_STRING_password | user IDENTIFIED_SYM WITH ident_or_text BY RANDOM_SYM PASSWORD | user
alter_user ::= user IDENTIFIED_SYM BY TEXT_STRING REPLACE_SYM TEXT_STRING_password opt_retain_current_password | user IDENTIFIED_SYM WITH ident_or_text BY TEXT_STRING_password REPLACE_SYM TEXT_STRING_password opt_retain_current_password | user IDENTIFIED_SYM BY TEXT_STRING_password opt_retain_current_password | user IDENTIFIED_SYM BY RANDOM_SYM PASSWORD opt_retain_current_password | user IDENTIFIED_SYM BY RANDOM_SYM PASSWORD REPLACE_SYM TEXT_STRING_password opt_retain_current_password | user IDENTIFIED_SYM WITH ident_or_text | user IDENTIFIED_SYM WITH ident_or_text AS TEXT_STRING_hash opt_retain_current_password | user IDENTIFIED_SYM WITH ident_or_text BY TEXT_STRING_password opt_retain_current_password | user IDENTIFIED_SYM WITH ident_or_text BY RANDOM_SYM PASSWORD opt_retain_current_password | user opt_discard_old_password
create_user_list ::= create_user | create_user_list ',' create_user
alter_user_list ::= alter_user | alter_user_list ',' alter_user
opt_column_list ::= | '(' column_list ')'
column_list ::= ident | column_list ',' ident
require_clause ::= /*empty*/ | REQUIRE_SYM require_list | REQUIRE_SYM SSL_SYM | REQUIRE_SYM X509_SYM | REQUIRE_SYM NONE_SYM
grant_options ::= | WITH GRANT OPTION
opt_grant_option ::= | WITH GRANT OPTION
opt_with_roles ::= | WITH ROLE_SYM role_list | WITH ROLE_SYM ALL opt_except_role_list | WITH ROLE_SYM NONE_SYM | WITH ROLE_SYM DEFAULT_SYM
opt_grant_as ::= | AS user opt_with_roles
begin_stmt ::= BEGIN_SYM opt_work
opt_work ::= | WORK_SYM
opt_chain ::= | AND_SYM NO_SYM CHAIN_SYM | AND_SYM CHAIN_SYM
opt_release ::= | RELEASE_SYM | NO_SYM RELEASE_SYM
opt_savepoint ::= | SAVEPOINT_SYM
commit ::= COMMIT_SYM opt_work opt_chain opt_release
rollback ::= ROLLBACK_SYM opt_work opt_chain opt_release | ROLLBACK_SYM opt_work TO_SYM opt_savepoint ident
savepoint ::= SAVEPOINT_SYM ident
release ::= RELEASE_SYM SAVEPOINT_SYM ident
union_option ::= | DISTINCT | ALL
row_subquery ::= subquery
table_subquery ::= subquery
subquery ::= query_expression_parens
query_spec_option ::= STRAIGHT_JOIN | HIGH_PRIORITY | DISTINCT | SQL_SMALL_RESULT | SQL_BIG_RESULT | SQL_BUFFER_RESULT | SQL_CALC_FOUND_ROWS | ALL
init_lex_create_info ::=
view_or_trigger_or_sp_or_event ::= definer init_lex_create_info definer_tail | no_definer init_lex_create_info no_definer_tail | view_replace_or_algorithm definer_opt init_lex_create_info view_tail
definer_tail ::= view_tail | trigger_tail | sp_tail | sf_tail | event_tail
no_definer_tail ::= view_tail | trigger_tail | sp_tail | sf_tail | udf_tail | event_tail
definer_opt ::= no_definer | definer
no_definer ::=
definer ::= DEFINER_SYM EQ user
view_replace_or_algorithm ::= view_replace | view_replace view_algorithm | view_algorithm
view_replace ::= OR_SYM REPLACE_SYM
view_algorithm ::= ALGORITHM_SYM EQ UNDEFINED_SYM | ALGORITHM_SYM EQ MERGE_SYM | ALGORITHM_SYM EQ TEMPTABLE_SYM
view_suid ::= | SQL_SYM SECURITY_SYM DEFINER_SYM | SQL_SYM SECURITY_SYM INVOKER_SYM
view_tail ::= view_suid VIEW_SYM table_ident opt_derived_column_list AS view_select
view_select ::= query_expression_or_parens view_check_option
view_check_option ::= | WITH CHECK_SYM OPTION | WITH CASCADED CHECK_SYM OPTION | WITH LOCAL_SYM CHECK_SYM OPTION
trigger_action_order ::= FOLLOWS_SYM | PRECEDES_SYM
trigger_follows_precedes_clause ::= | trigger_action_order ident_or_text
trigger_tail ::= TRIGGER_SYM sp_name trg_action_time trg_event ON_SYM table_ident FOR_SYM EACH_SYM ROW_SYM trigger_follows_precedes_clause sp_proc_stmt
udf_tail ::= AGGREGATE_SYM FUNCTION_SYM ident RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys | FUNCTION_SYM ident RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
sf_tail ::= FUNCTION_SYM sp_name '(' sp_fdparam_list ')' RETURNS_SYM type opt_collate sp_c_chistics sp_proc_stmt
sp_tail ::= PROCEDURE_SYM sp_name '(' sp_pdparam_list ')' sp_c_chistics sp_proc_stmt
xa ::= XA_SYM begin_or_start xid opt_join_or_resume | XA_SYM END xid opt_suspend | XA_SYM PREPARE_SYM xid | XA_SYM COMMIT_SYM xid opt_one_phase | XA_SYM ROLLBACK_SYM xid | XA_SYM RECOVER_SYM opt_convert_xid
opt_convert_xid ::= | CONVERT_SYM XID_SYM
xid ::= text_string | text_string ',' text_string | text_string ',' text_string ',' ulong_num
begin_or_start ::= BEGIN_SYM | START_SYM
opt_join_or_resume ::= | JOIN_SYM | RESUME_SYM
opt_one_phase ::= | ONE_SYM PHASE_SYM
opt_suspend ::= | SUSPEND_SYM | SUSPEND_SYM FOR_SYM MIGRATE_SYM
install ::= INSTALL_SYM PLUGIN_SYM ident SONAME_SYM TEXT_STRING_sys | INSTALL_SYM COMPONENT_SYM TEXT_STRING_sys_list
uninstall ::= UNINSTALL_SYM PLUGIN_SYM ident | UNINSTALL_SYM COMPONENT_SYM TEXT_STRING_sys_list
TEXT_STRING_sys_list ::= TEXT_STRING_sys | TEXT_STRING_sys_list ',' TEXT_STRING_sys
import_stmt ::= IMPORT TABLE_SYM FROM TEXT_STRING_sys_list
clone_stmt ::= CLONE_SYM LOCAL_SYM DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_filesystem | CLONE_SYM INSTANCE_SYM FROM user ':' ulong_num IDENTIFIED_SYM BY TEXT_STRING_sys opt_datadir_ssl
opt_datadir_ssl ::= opt_ssl | DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_filesystem opt_ssl
opt_ssl ::= | REQUIRE_SYM SSL_SYM | REQUIRE_SYM NO_SYM SSL_SYM
resource_group_types ::= USER | SYSTEM_SYM
opt_resource_group_vcpu_list ::= | VCPU_SYM opt_equal vcpu_range_spec_list
vcpu_range_spec_list ::= vcpu_num_or_range | vcpu_range_spec_list opt_comma vcpu_num_or_range
vcpu_num_or_range ::= NUM | NUM '-' NUM
signed_num ::= NUM | '-' NUM
opt_resource_group_priority ::= | THREAD_PRIORITY_SYM opt_equal signed_num
opt_resource_group_enable_disable ::= | ENABLE_SYM | DISABLE_SYM
opt_force ::= | FORCE_SYM
json_attribute ::= TEXT_STRING_sys

// Tokens from https://raw.githubusercontent.com/percona/percona-server/8.0/sql/lex.h

AND_AND_SYM ::= "&&"
LT ::= "<"
LE ::= "<="
NE ::= "<>"
NE ::= "!="
EQ ::= "="
GT_SYM ::= ">"
GE ::= ">="
SHIFT_LEFT ::= "<<"
SHIFT_RIGHT ::= ">>"
EQUAL_SYM ::= "<=>"
ACCESSIBLE_SYM ::= "ACCESSIBLE"
ACCOUNT_SYM ::= "ACCOUNT"
ACTION ::= "ACTION"
ACTIVE_SYM ::= "ACTIVE"
ADD ::= "ADD"
ADMIN_SYM ::= "ADMIN"
AFTER_SYM ::= "AFTER"
AGAINST ::= "AGAINST"
AGGREGATE_SYM ::= "AGGREGATE"
ALL ::= "ALL"
ALGORITHM_SYM ::= "ALGORITHM"
ALWAYS_SYM ::= "ALWAYS"
AND_SYM ::= "AND"
ANY_SYM ::= "ANY"
ARRAY_SYM ::= "ARRAY"
AS ::= "AS"
ASC ::= "ASC"
ASCII_SYM ::= "ASCII"
ASENSITIVE_SYM ::= "ASENSITIVE"
AT_SYM ::= "AT"
ATTRIBUTE_SYM ::= "ATTRIBUTE"
AUTO_INC ::= "AUTO_INCREMENT"
AUTOEXTEND_SIZE_SYM ::= "AUTOEXTEND_SIZE"
AVG_SYM ::= "AVG"
AVG_ROW_LENGTH ::= "AVG_ROW_LENGTH"
BACKUP_SYM ::= "BACKUP"
BEFORE_SYM ::= "BEFORE"
BEGIN_SYM ::= "BEGIN"
BETWEEN_SYM ::= "BETWEEN"
BIGINT_SYM ::= "BIGINT"
BINARY_SYM ::= "BINARY"
BINLOG_SYM ::= "BINLOG"
BIT_SYM ::= "BIT"
BLOB_SYM ::= "BLOB"
BLOCK_SYM ::= "BLOCK"
BOOL_SYM ::= "BOOL"
BOOLEAN_SYM ::= "BOOLEAN"
BOTH ::= "BOTH"
BTREE_SYM ::= "BTREE"
BUCKETS_SYM ::= "BUCKETS"
BY ::= "BY"
BYTE_SYM ::= "BYTE"
CACHE_SYM ::= "CACHE"
CASCADE ::= "CASCADE"
CASCADED ::= "CASCADED"
CASE_SYM ::= "CASE"
CATALOG_NAME_SYM ::= "CATALOG_NAME"
CHAIN_SYM ::= "CHAIN"
CHANGE ::= "CHANGE"
CHANGED ::= "CHANGED"
CHANGED_PAGE_BITMAPS_SYM ::= "CHANGED_PAGE_BITMAPS"
CHANNEL_SYM ::= "CHANNEL"
CHAR_SYM ::= "CHAR"
CHAR_SYM ::= "CHARACTER"
CHARSET ::= "CHARSET"
CHECKSUM_SYM ::= "CHECKSUM"
CIPHER_SYM ::= "CIPHER"
CLASS_ORIGIN_SYM ::= "CLASS_ORIGIN"
CLIENT_SYM ::= "CLIENT"
CLIENT_STATS_SYM ::= "CLIENT_STATISTICS"
CLONE_SYM ::= "CLONE"
CLOSE_SYM ::= "CLOSE"
CLUSTERING_SYM ::= "CLUSTERING"
COALESCE ::= "COALESCE"
CODE_SYM ::= "CODE"
COLLATE_SYM ::= "COLLATE"
COLLATION_SYM ::= "COLLATION"
COLUMN_SYM ::= "COLUMN"
COLUMN_FORMAT_SYM ::= "COLUMN_FORMAT"
COLUMN_NAME_SYM ::= "COLUMN_NAME"
COLUMNS ::= "COLUMNS"
COMMENT_SYM ::= "COMMENT"
COMMIT_SYM ::= "COMMIT"
COMMITTED_SYM ::= "COMMITTED"
COMPACT_SYM ::= "COMPACT"
COMPLETION_SYM ::= "COMPLETION"
COMPONENT_SYM ::= "COMPONENT"
COMPRESSION_SYM ::= "COMPRESSION"
COMPRESSED_SYM ::= "COMPRESSED"
COMPRESSION_DICTIONARY_SYM ::= "COMPRESSION_DICTIONARY"
ENCRYPTION_SYM ::= "ENCRYPTION"
ENCRYPTION_KEY_ID_SYM ::= "ENCRYPTION_KEY_ID"
CONCURRENT ::= "CONCURRENT"
CONDITION_SYM ::= "CONDITION"
CONNECTION_SYM ::= "CONNECTION"
CONSISTENT_SYM ::= "CONSISTENT"
CONSTRAINT ::= "CONSTRAINT"
CONSTRAINT_CATALOG_SYM ::= "CONSTRAINT_CATALOG"
CONSTRAINT_NAME_SYM ::= "CONSTRAINT_NAME"
CONSTRAINT_SCHEMA_SYM ::= "CONSTRAINT_SCHEMA"
CONTAINS_SYM ::= "CONTAINS"
CONTEXT_SYM ::= "CONTEXT"
CONTINUE_SYM ::= "CONTINUE"
CONVERT_SYM ::= "CONVERT"
CPU_SYM ::= "CPU"
CROSS ::= "CROSS"
CUBE_SYM ::= "CUBE"
CUME_DIST_SYM ::= "CUME_DIST"
CURRENT_SYM ::= "CURRENT"
CURDATE ::= "CURRENT_DATE"
CURTIME ::= "CURRENT_TIME"
NOW_SYM ::= "CURRENT_TIMESTAMP"
CURRENT_USER ::= "CURRENT_USER"
CURSOR_SYM ::= "CURSOR"
CURSOR_NAME_SYM ::= "CURSOR_NAME"
DATA_SYM ::= "DATA"
DATABASE ::= "DATABASE"
DATABASES ::= "DATABASES"
DATAFILE_SYM ::= "DATAFILE"
DATE_SYM ::= "DATE"
DATETIME_SYM ::= "DATETIME"
DAY_SYM ::= "DAY"
DAY_HOUR_SYM ::= "DAY_HOUR"
DAY_MICROSECOND_SYM ::= "DAY_MICROSECOND"
DAY_MINUTE_SYM ::= "DAY_MINUTE"
DAY_SECOND_SYM ::= "DAY_SECOND"
DEALLOCATE_SYM ::= "DEALLOCATE"
DECIMAL_SYM ::= "DEC"
DECIMAL_SYM ::= "DECIMAL"
DECLARE_SYM ::= "DECLARE"
DEFAULT_SYM ::= "DEFAULT"
DEFAULT_AUTH_SYM ::= "DEFAULT_AUTH"
DEFINER_SYM ::= "DEFINER"
DEFINITION_SYM ::= "DEFINITION"
DELAYED_SYM ::= "DELAYED"
DELAY_KEY_WRITE_SYM ::= "DELAY_KEY_WRITE"
DENSE_RANK_SYM ::= "DENSE_RANK"
DESC ::= "DESC"
DESCRIBE ::= "DESCRIBE"
DESCRIPTION_SYM ::= "DESCRIPTION"
DETERMINISTIC_SYM ::= "DETERMINISTIC"
DIAGNOSTICS_SYM ::= "DIAGNOSTICS"
DIRECTORY_SYM ::= "DIRECTORY"
DISABLE_SYM ::= "DISABLE"
DISCARD_SYM ::= "DISCARD"
DISK_SYM ::= "DISK"
DISTINCT ::= "DISTINCT"
DISTINCT ::= "DISTINCTROW"
DIV_SYM ::= "DIV"
DO_SYM ::= "DO"
DOUBLE_SYM ::= "DOUBLE"
DROP ::= "DROP"
DUAL_SYM ::= "DUAL"
DUMPFILE ::= "DUMPFILE"
DUPLICATE_SYM ::= "DUPLICATE"
DYNAMIC_SYM ::= "DYNAMIC"
EACH_SYM ::= "EACH"
EFFECTIVE_SYM ::= "EFFECTIVE"
ELSE ::= "ELSE"
ELSEIF_SYM ::= "ELSEIF"
EMPTY_SYM ::= "EMPTY"
ENABLE_SYM ::= "ENABLE"
ENCLOSED ::= "ENCLOSED"
END ::= "END"
ENDS_SYM ::= "ENDS"
ENFORCED_SYM ::= "ENFORCED"
ENGINE_SYM ::= "ENGINE"
ENGINE_ATTRIBUTE_SYM ::= "ENGINE_ATTRIBUTE"
ENGINES_SYM ::= "ENGINES"
ENUM_SYM ::= "ENUM"
ERROR_SYM ::= "ERROR"
ERRORS ::= "ERRORS"
ESCAPE_SYM ::= "ESCAPE"
ESCAPED ::= "ESCAPED"
EVENT_SYM ::= "EVENT"
EVENTS_SYM ::= "EVENTS"
EVERY_SYM ::= "EVERY"
EXCEPT_SYM ::= "EXCEPT"
EXCHANGE_SYM ::= "EXCHANGE"
EXCLUDE_SYM ::= "EXCLUDE"
EXECUTE_SYM ::= "EXECUTE"
EXISTS ::= "EXISTS"
EXIT_SYM ::= "EXIT"
EXPANSION_SYM ::= "EXPANSION"
EXPORT_SYM ::= "EXPORT"
EXPIRE_SYM ::= "EXPIRE"
DESCRIBE ::= "EXPLAIN"
EXTENDED_SYM ::= "EXTENDED"
EXTENT_SIZE_SYM ::= "EXTENT_SIZE"
FAILED_LOGIN_ATTEMPTS_SYM ::= "FAILED_LOGIN_ATTEMPTS"
FALSE_SYM ::= "FALSE"
FAST_SYM ::= "FAST"
FAULTS_SYM ::= "FAULTS"
FETCH_SYM ::= "FETCH"
COLUMNS ::= "FIELDS"
FILE_SYM ::= "FILE"
FILE_BLOCK_SIZE_SYM ::= "FILE_BLOCK_SIZE"
FILTER_SYM ::= "FILTER"
FIRST_SYM ::= "FIRST"
FIRST_VALUE_SYM ::= "FIRST_VALUE"
FIXED_SYM ::= "FIXED"
FLOAT_SYM ::= "FLOAT"
FLOAT_SYM ::= "FLOAT4"
DOUBLE_SYM ::= "FLOAT8"
FLUSH_SYM ::= "FLUSH"
FOLLOWS_SYM ::= "FOLLOWS"
FOLLOWING_SYM ::= "FOLLOWING"
FOR_SYM ::= "FOR"
FORCE_SYM ::= "FORCE"
FOREIGN ::= "FOREIGN"
FORMAT_SYM ::= "FORMAT"
FOUND_SYM ::= "FOUND"
FROM ::= "FROM"
FULL ::= "FULL"
FULLTEXT_SYM ::= "FULLTEXT"
FUNCTION_SYM ::= "FUNCTION"
GENERAL ::= "GENERAL"
GROUP_REPLICATION ::= "GROUP_REPLICATION"
GEOMETRYCOLLECTION_SYM ::= "GEOMCOLLECTION"
GEOMETRY_SYM ::= "GEOMETRY"
GEOMETRYCOLLECTION_SYM ::= "GEOMETRYCOLLECTION"
GET_FORMAT ::= "GET_FORMAT"
GET_MASTER_PUBLIC_KEY_SYM ::= "GET_MASTER_PUBLIC_KEY"
GET_SOURCE_PUBLIC_KEY_SYM ::= "GET_SOURCE_PUBLIC_KEY"
GET_SYM ::= "GET"
GENERATED ::= "GENERATED"
GLOBAL_SYM ::= "GLOBAL"
GRANT ::= "GRANT"
GRANTS ::= "GRANTS"
GROUP_SYM ::= "GROUP"
GROUPING_SYM ::= "GROUPING"
GROUPS_SYM ::= "GROUPS"
HANDLER_SYM ::= "HANDLER"
HASH_SYM ::= "HASH"
HAVING ::= "HAVING"
HELP_SYM ::= "HELP"
HIGH_PRIORITY ::= "HIGH_PRIORITY"
HISTOGRAM_SYM ::= "HISTOGRAM"
HISTORY_SYM ::= "HISTORY"
HOST_SYM ::= "HOST"
HOSTS_SYM ::= "HOSTS"
HOUR_SYM ::= "HOUR"
HOUR_MICROSECOND_SYM ::= "HOUR_MICROSECOND"
HOUR_MINUTE_SYM ::= "HOUR_MINUTE"
HOUR_SECOND_SYM ::= "HOUR_SECOND"
IDENTIFIED_SYM ::= "IDENTIFIED"
IF ::= "IF"
IGNORE_SYM ::= "IGNORE"
IGNORE_SERVER_IDS_SYM ::= "IGNORE_SERVER_IDS"
IMPORT ::= "IMPORT"
IN_SYM ::= "IN"
INACTIVE_SYM ::= "INACTIVE"
INDEX_SYM ::= "INDEX"
INDEX_STATS_SYM ::= "INDEX_STATISTICS"
INDEXES ::= "INDEXES"
INFILE ::= "INFILE"
INITIAL_SIZE_SYM ::= "INITIAL_SIZE"
INNER_SYM ::= "INNER"
INOUT_SYM ::= "INOUT"
INSENSITIVE_SYM ::= "INSENSITIVE"
INSERT_METHOD ::= "INSERT_METHOD"
INSTALL_SYM ::= "INSTALL"
INSTANCE_SYM ::= "INSTANCE"
INT_SYM ::= "INT"
TINYINT_SYM ::= "INT1"
SMALLINT_SYM ::= "INT2"
MEDIUMINT_SYM ::= "INT3"
INT_SYM ::= "INT4"
BIGINT_SYM ::= "INT8"
INT_SYM ::= "INTEGER"
INTERVAL_SYM ::= "INTERVAL"
INTO ::= "INTO"
IO_SYM ::= "IO"
IO_AFTER_GTIDS ::= "IO_AFTER_GTIDS"
IO_BEFORE_GTIDS ::= "IO_BEFORE_GTIDS"
RELAY_THREAD ::= "IO_THREAD"
IPC_SYM ::= "IPC"
IS ::= "IS"
ISOLATION ::= "ISOLATION"
ISSUER_SYM ::= "ISSUER"
ITERATE_SYM ::= "ITERATE"
INVISIBLE_SYM ::= "INVISIBLE"
INVOKER_SYM ::= "INVOKER"
JOIN_SYM ::= "JOIN"
JSON_SYM ::= "JSON"
JSON_TABLE_SYM ::= "JSON_TABLE"
JSON_VALUE_SYM ::= "JSON_VALUE"
KEY_SYM ::= "KEY"
KEYS ::= "KEYS"
KEY_BLOCK_SIZE ::= "KEY_BLOCK_SIZE"
KILL_SYM ::= "KILL"
LAG_SYM ::= "LAG"
LANGUAGE_SYM ::= "LANGUAGE"
LAST_SYM ::= "LAST"
LAST_VALUE_SYM ::= "LAST_VALUE"
LATERAL_SYM ::= "LATERAL"
LEAD_SYM ::= "LEAD"
LEADING ::= "LEADING"
LEAVE_SYM ::= "LEAVE"
LEAVES ::= "LEAVES"
LEFT ::= "LEFT"
LESS_SYM ::= "LESS"
LEVEL_SYM ::= "LEVEL"
LIKE ::= "LIKE"
LIMIT ::= "LIMIT"
LINEAR_SYM ::= "LINEAR"
LINES ::= "LINES"
LINESTRING_SYM ::= "LINESTRING"
LIST_SYM ::= "LIST"
LOCAL_SYM ::= "LOCAL"
NOW_SYM ::= "LOCALTIME"
NOW_SYM ::= "LOCALTIMESTAMP"
LOCK_SYM ::= "LOCK"
LOCKED_SYM ::= "LOCKED"
LOCKS_SYM ::= "LOCKS"
LOGFILE_SYM ::= "LOGFILE"
LOGS_SYM ::= "LOGS"
LONG_SYM ::= "LONG"
LONGBLOB_SYM ::= "LONGBLOB"
LONGTEXT_SYM ::= "LONGTEXT"
LOOP_SYM ::= "LOOP"
LOW_PRIORITY ::= "LOW_PRIORITY"
MASTER_SYM ::= "MASTER"
MASTER_AUTO_POSITION_SYM ::= "MASTER_AUTO_POSITION"
MASTER_BIND_SYM ::= "MASTER_BIND"
MASTER_CONNECT_RETRY_SYM ::= "MASTER_CONNECT_RETRY"
MASTER_COMPRESSION_ALGORITHM_SYM ::= "MASTER_COMPRESSION_ALGORITHMS"
MASTER_DELAY_SYM ::= "MASTER_DELAY"
MASTER_HEARTBEAT_PERIOD_SYM ::= "MASTER_HEARTBEAT_PERIOD"
MASTER_HOST_SYM ::= "MASTER_HOST"
MASTER_LOG_FILE_SYM ::= "MASTER_LOG_FILE"
MASTER_LOG_POS_SYM ::= "MASTER_LOG_POS"
MASTER_PASSWORD_SYM ::= "MASTER_PASSWORD"
MASTER_PORT_SYM ::= "MASTER_PORT"
MASTER_PUBLIC_KEY_PATH_SYM ::= "MASTER_PUBLIC_KEY_PATH"
MASTER_RETRY_COUNT_SYM ::= "MASTER_RETRY_COUNT"
MASTER_SSL_SYM ::= "MASTER_SSL"
MASTER_SSL_CA_SYM ::= "MASTER_SSL_CA"
MASTER_SSL_CAPATH_SYM ::= "MASTER_SSL_CAPATH"
MASTER_SSL_CERT_SYM ::= "MASTER_SSL_CERT"
MASTER_SSL_CIPHER_SYM ::= "MASTER_SSL_CIPHER"
MASTER_SSL_CRL_SYM ::= "MASTER_SSL_CRL"
MASTER_SSL_CRLPATH_SYM ::= "MASTER_SSL_CRLPATH"
MASTER_SSL_KEY_SYM ::= "MASTER_SSL_KEY"
MASTER_SSL_VERIFY_SERVER_CERT_SYM ::= "MASTER_SSL_VERIFY_SERVER_CERT"
MASTER_TLS_CIPHERSUITES_SYM ::= "MASTER_TLS_CIPHERSUITES"
MASTER_TLS_VERSION_SYM ::= "MASTER_TLS_VERSION"
MASTER_USER_SYM ::= "MASTER_USER"
MASTER_ZSTD_COMPRESSION_LEVEL_SYM ::= "MASTER_ZSTD_COMPRESSION_LEVEL"
MATCH ::= "MATCH"
MAX_CONNECTIONS_PER_HOUR ::= "MAX_CONNECTIONS_PER_HOUR"
MAX_QUERIES_PER_HOUR ::= "MAX_QUERIES_PER_HOUR"
MAX_ROWS ::= "MAX_ROWS"
MAX_SIZE_SYM ::= "MAX_SIZE"
MAX_UPDATES_PER_HOUR ::= "MAX_UPDATES_PER_HOUR"
MAX_USER_CONNECTIONS_SYM ::= "MAX_USER_CONNECTIONS"
MAX_VALUE_SYM ::= "MAXVALUE"
MEDIUM_SYM ::= "MEDIUM"
MEDIUMBLOB_SYM ::= "MEDIUMBLOB"
MEDIUMINT_SYM ::= "MEDIUMINT"
MEDIUMTEXT_SYM ::= "MEDIUMTEXT"
MEMBER_SYM ::= "MEMBER"
MEMORY_SYM ::= "MEMORY"
MERGE_SYM ::= "MERGE"
MESSAGE_TEXT_SYM ::= "MESSAGE_TEXT"
MICROSECOND_SYM ::= "MICROSECOND"
MEDIUMINT_SYM ::= "MIDDLEINT"
MIGRATE_SYM ::= "MIGRATE"
MINUTE_SYM ::= "MINUTE"
MINUTE_MICROSECOND_SYM ::= "MINUTE_MICROSECOND"
MINUTE_SECOND_SYM ::= "MINUTE_SECOND"
MIN_ROWS ::= "MIN_ROWS"
MOD_SYM ::= "MOD"
MODE_SYM ::= "MODE"
MODIFIES_SYM ::= "MODIFIES"
MODIFY_SYM ::= "MODIFY"
MONTH_SYM ::= "MONTH"
MULTILINESTRING_SYM ::= "MULTILINESTRING"
MULTIPOINT_SYM ::= "MULTIPOINT"
MULTIPOLYGON_SYM ::= "MULTIPOLYGON"
MUTEX_SYM ::= "MUTEX"
MYSQL_ERRNO_SYM ::= "MYSQL_ERRNO"
NAME_SYM ::= "NAME"
NAMES_SYM ::= "NAMES"
NATIONAL_SYM ::= "NATIONAL"
NATURAL ::= "NATURAL"
NDBCLUSTER_SYM ::= "NDB"
NDBCLUSTER_SYM ::= "NDBCLUSTER"
NCHAR_SYM ::= "NCHAR"
NESTED_SYM ::= "NESTED"
NETWORK_NAMESPACE_SYM ::= "NETWORK_NAMESPACE"
NEVER_SYM ::= "NEVER"
NEW_SYM ::= "NEW"
NEXT_SYM ::= "NEXT"
NO_SYM ::= "NO"
NO_WAIT_SYM ::= "NO_WAIT"
NOWAIT_SYM ::= "NOWAIT"
NODEGROUP_SYM ::= "NODEGROUP"
NONE_SYM ::= "NONE"
NOT_SYM ::= "NOT"
NO_WRITE_TO_BINLOG ::= "NO_WRITE_TO_BINLOG"
NTH_VALUE_SYM ::= "NTH_VALUE"
NTILE_SYM ::= "NTILE"
NULL_SYM ::= "NULL"
NULLS_SYM ::= "NULLS"
NUMBER_SYM ::= "NUMBER"
NUMERIC_SYM ::= "NUMERIC"
NVARCHAR_SYM ::= "NVARCHAR"
OF_SYM ::= "OF"
OFF_SYM ::= "OFF"
OFFSET_SYM ::= "OFFSET"
OJ_SYM ::= "OJ"
OLD_SYM ::= "OLD"
ON_SYM ::= "ON"
ONE_SYM ::= "ONE"
ONLY_SYM ::= "ONLY"
OPEN_SYM ::= "OPEN"
OPTIMIZER_COSTS_SYM ::= "OPTIMIZER_COSTS"
OPTIONS_SYM ::= "OPTIONS"
OPTION ::= "OPTION"
OPTIONAL_SYM ::= "OPTIONAL"
OPTIONALLY ::= "OPTIONALLY"
OR_SYM ::= "OR"
ORGANIZATION_SYM ::= "ORGANIZATION"
OTHERS_SYM ::= "OTHERS"
ORDER_SYM ::= "ORDER"
ORDINALITY_SYM ::= "ORDINALITY"
OUT_SYM ::= "OUT"
OUTER_SYM ::= "OUTER"
OUTFILE ::= "OUTFILE"
OVER_SYM ::= "OVER"
OWNER_SYM ::= "OWNER"
PACK_KEYS_SYM ::= "PACK_KEYS"
PATH_SYM ::= "PATH"
PARSER_SYM ::= "PARSER"
PAGE_SYM ::= "PAGE"
PARTIAL ::= "PARTIAL"
PARTITION_SYM ::= "PARTITION"
PARTITIONING_SYM ::= "PARTITIONING"
PARTITIONS_SYM ::= "PARTITIONS"
PASSWORD ::= "PASSWORD"
PASSWORD_LOCK_TIME_SYM ::= "PASSWORD_LOCK_TIME"
PERCENT_RANK_SYM ::= "PERCENT_RANK"
PERSIST_SYM ::= "PERSIST"
PERSIST_ONLY_SYM ::= "PERSIST_ONLY"
PHASE_SYM ::= "PHASE"
PLUGIN_SYM ::= "PLUGIN"
PLUGINS_SYM ::= "PLUGINS"
PLUGIN_DIR_SYM ::= "PLUGIN_DIR"
POINT_SYM ::= "POINT"
POLYGON_SYM ::= "POLYGON"
PORT_SYM ::= "PORT"
PRECEDES_SYM ::= "PRECEDES"
PRECEDING_SYM ::= "PRECEDING"
PRECISION ::= "PRECISION"
PREPARE_SYM ::= "PREPARE"
PRESERVE_SYM ::= "PRESERVE"
PREV_SYM ::= "PREV"
PRIMARY_SYM ::= "PRIMARY"
PRIVILEGES ::= "PRIVILEGES"
PRIVILEGE_CHECKS_USER_SYM ::= "PRIVILEGE_CHECKS_USER"
PROCEDURE_SYM ::= "PROCEDURE"
PROCESS ::= "PROCESS"
PROCESSLIST_SYM ::= "PROCESSLIST"
PROFILE_SYM ::= "PROFILE"
PROFILES_SYM ::= "PROFILES"
PROXY_SYM ::= "PROXY"
PURGE ::= "PURGE"
QUARTER_SYM ::= "QUARTER"
QUERY_SYM ::= "QUERY"
QUICK ::= "QUICK"
RANDOM_SYM ::= "RANDOM"
RANK_SYM ::= "RANK"
RANGE_SYM ::= "RANGE"
READ_SYM ::= "READ"
READ_ONLY_SYM ::= "READ_ONLY"
READ_WRITE_SYM ::= "READ_WRITE"
READS_SYM ::= "READS"
REAL_SYM ::= "REAL"
REBUILD_SYM ::= "REBUILD"
RECOVER_SYM ::= "RECOVER"
RECURSIVE_SYM ::= "RECURSIVE"
REDO_BUFFER_SIZE_SYM ::= "REDO_BUFFER_SIZE"
REDUNDANT_SYM ::= "REDUNDANT"
REFERENCE_SYM ::= "REFERENCE"
REFERENCES ::= "REFERENCES"
REGEXP ::= "REGEXP"
RELAY ::= "RELAY"
RELAYLOG_SYM ::= "RELAYLOG"
RELAY_LOG_FILE_SYM ::= "RELAY_LOG_FILE"
RELAY_LOG_POS_SYM ::= "RELAY_LOG_POS"
RELAY_THREAD ::= "RELAY_THREAD"
RELEASE_SYM ::= "RELEASE"
RELOAD ::= "RELOAD"
REMOVE_SYM ::= "REMOVE"
RENAME ::= "RENAME"
ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_SYM ::= "ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS"
REORGANIZE_SYM ::= "REORGANIZE"
REPAIR ::= "REPAIR"
REPEATABLE_SYM ::= "REPEATABLE"
REPLICA_SYM ::= "REPLICA"
REPLICAS_SYM ::= "REPLICAS"
REPLICATION ::= "REPLICATION"
REPLICATE_DO_DB ::= "REPLICATE_DO_DB"
REPLICATE_IGNORE_DB ::= "REPLICATE_IGNORE_DB"
REPLICATE_DO_TABLE ::= "REPLICATE_DO_TABLE"
REPLICATE_IGNORE_TABLE ::= "REPLICATE_IGNORE_TABLE"
REPLICATE_WILD_DO_TABLE ::= "REPLICATE_WILD_DO_TABLE"
REPLICATE_WILD_IGNORE_TABLE ::= "REPLICATE_WILD_IGNORE_TABLE"
REPLICATE_REWRITE_DB ::= "REPLICATE_REWRITE_DB"
REPEAT_SYM ::= "REPEAT"
REQUIRE_SYM ::= "REQUIRE"
REQUIRE_ROW_FORMAT_SYM ::= "REQUIRE_ROW_FORMAT"
REQUIRE_TABLE_PRIMARY_KEY_CHECK_SYM ::= "REQUIRE_TABLE_PRIMARY_KEY_CHECK"
RESET_SYM ::= "RESET"
RESPECT_SYM ::= "RESPECT"
RESIGNAL_SYM ::= "RESIGNAL"
RESOURCE_SYM ::= "RESOURCE"
RESTART_SYM ::= "RESTART"
RESTORE_SYM ::= "RESTORE"
RESTRICT ::= "RESTRICT"
RESUME_SYM ::= "RESUME"
RETAIN_SYM ::= "RETAIN"
RETURNED_SQLSTATE_SYM ::= "RETURNED_SQLSTATE"
RETURN_SYM ::= "RETURN"
RETURNING_SYM ::= "RETURNING"
RETURNS_SYM ::= "RETURNS"
REUSE_SYM ::= "REUSE"
REVERSE_SYM ::= "REVERSE"
REVOKE ::= "REVOKE"
RIGHT ::= "RIGHT"
REGEXP ::= "RLIKE"
ROLE_SYM ::= "ROLE"
ROLLBACK_SYM ::= "ROLLBACK"
ROLLUP_SYM ::= "ROLLUP"
ROUTINE_SYM ::= "ROUTINE"
ROTATE_SYM ::= "ROTATE"
ROW_SYM ::= "ROW"
ROW_COUNT_SYM ::= "ROW_COUNT"
ROW_NUMBER_SYM ::= "ROW_NUMBER"
ROWS_SYM ::= "ROWS"
ROW_FORMAT_SYM ::= "ROW_FORMAT"
RTREE_SYM ::= "RTREE"
SAVEPOINT_SYM ::= "SAVEPOINT"
SCHEDULE_SYM ::= "SCHEDULE"
DATABASE ::= "SCHEMA"
SCHEMA_NAME_SYM ::= "SCHEMA_NAME"
DATABASES ::= "SCHEMAS"
SECOND_SYM ::= "SECOND"
SECOND_MICROSECOND_SYM ::= "SECOND_MICROSECOND"
SECONDARY_SYM ::= "SECONDARY"
SECONDARY_ENGINE_SYM ::= "SECONDARY_ENGINE"
SECONDARY_ENGINE_ATTRIBUTE_SYM ::= "SECONDARY_ENGINE_ATTRIBUTE"
SECONDARY_LOAD_SYM ::= "SECONDARY_LOAD"
SECONDARY_UNLOAD_SYM ::= "SECONDARY_UNLOAD"
SECURITY_SYM ::= "SECURITY"
SENSITIVE_SYM ::= "SENSITIVE"
SEPARATOR_SYM ::= "SEPARATOR"
SERIAL_SYM ::= "SERIAL"
SERIALIZABLE_SYM ::= "SERIALIZABLE"
SESSION_SYM ::= "SESSION"
SEQUENCE_TABLE_SYM ::= "SEQUENCE_TABLE"
SERVER_SYM ::= "SERVER"
SET_SYM ::= "SET"
SHARE_SYM ::= "SHARE"
SHOW ::= "SHOW"
SHUTDOWN ::= "SHUTDOWN"
SIGNAL_SYM ::= "SIGNAL"
SIGNED_SYM ::= "SIGNED"
SIMPLE_SYM ::= "SIMPLE"
SKIP_SYM ::= "SKIP"
SLAVE ::= "SLAVE"
SLOW ::= "SLOW"
SNAPSHOT_SYM ::= "SNAPSHOT"
SMALLINT_SYM ::= "SMALLINT"
SOCKET_SYM ::= "SOCKET"
ANY_SYM ::= "SOME"
SONAME_SYM ::= "SONAME"
SOUNDS_SYM ::= "SOUNDS"
SOURCE_SYM ::= "SOURCE"
SOURCE_AUTO_POSITION_SYM ::= "SOURCE_AUTO_POSITION"
SOURCE_BIND_SYM ::= "SOURCE_BIND"
SOURCE_COMPRESSION_ALGORITHM_SYM ::= "SOURCE_COMPRESSION_ALGORITHMS"
SOURCE_CONNECT_RETRY_SYM ::= "SOURCE_CONNECT_RETRY"
SOURCE_CONNECTION_AUTO_FAILOVER_SYM ::= "SOURCE_CONNECTION_AUTO_FAILOVER"
SOURCE_DELAY_SYM ::= "SOURCE_DELAY"
SOURCE_HEARTBEAT_PERIOD_SYM ::= "SOURCE_HEARTBEAT_PERIOD"
SOURCE_HOST_SYM ::= "SOURCE_HOST"
SOURCE_LOG_FILE_SYM ::= "SOURCE_LOG_FILE"
SOURCE_LOG_POS_SYM ::= "SOURCE_LOG_POS"
SOURCE_PASSWORD_SYM ::= "SOURCE_PASSWORD"
SOURCE_PORT_SYM ::= "SOURCE_PORT"
SOURCE_PUBLIC_KEY_PATH_SYM ::= "SOURCE_PUBLIC_KEY_PATH"
SOURCE_RETRY_COUNT_SYM ::= "SOURCE_RETRY_COUNT"
SOURCE_SSL_CAPATH_SYM ::= "SOURCE_SSL_CAPATH"
SOURCE_SSL_CA_SYM ::= "SOURCE_SSL_CA"
SOURCE_SSL_CERT_SYM ::= "SOURCE_SSL_CERT"
SOURCE_SSL_CIPHER_SYM ::= "SOURCE_SSL_CIPHER"
SOURCE_SSL_CRL_SYM ::= "SOURCE_SSL_CRL"
SOURCE_SSL_CRLPATH_SYM ::= "SOURCE_SSL_CRLPATH"
SOURCE_SSL_KEY_SYM ::= "SOURCE_SSL_KEY"
SOURCE_SSL_SYM ::= "SOURCE_SSL"
SOURCE_SSL_VERIFY_SERVER_CERT_SYM ::= "SOURCE_SSL_VERIFY_SERVER_CERT"
SOURCE_TLS_CIPHERSUITES_SYM ::= "SOURCE_TLS_CIPHERSUITES"
SOURCE_TLS_VERSION_SYM ::= "SOURCE_TLS_VERSION"
SOURCE_USER_SYM ::= "SOURCE_USER"
SOURCE_ZSTD_COMPRESSION_LEVEL_SYM ::= "SOURCE_ZSTD_COMPRESSION_LEVEL"
SPATIAL_SYM ::= "SPATIAL"
SPECIFIC_SYM ::= "SPECIFIC"
SQL_SYM ::= "SQL"
SQLEXCEPTION_SYM ::= "SQLEXCEPTION"
SQLSTATE_SYM ::= "SQLSTATE"
SQLWARNING_SYM ::= "SQLWARNING"
SQL_AFTER_GTIDS ::= "SQL_AFTER_GTIDS"
SQL_AFTER_MTS_GAPS ::= "SQL_AFTER_MTS_GAPS"
SQL_BEFORE_GTIDS ::= "SQL_BEFORE_GTIDS"
SQL_BIG_RESULT ::= "SQL_BIG_RESULT"
SQL_BUFFER_RESULT ::= "SQL_BUFFER_RESULT"
SQL_CALC_FOUND_ROWS ::= "SQL_CALC_FOUND_ROWS"
SQL_NO_CACHE_SYM ::= "SQL_NO_CACHE"
SQL_SMALL_RESULT ::= "SQL_SMALL_RESULT"
SQL_THREAD ::= "SQL_THREAD"
SECOND_SYM ::= "SQL_TSI_SECOND"
MINUTE_SYM ::= "SQL_TSI_MINUTE"
HOUR_SYM ::= "SQL_TSI_HOUR"
DAY_SYM ::= "SQL_TSI_DAY"
WEEK_SYM ::= "SQL_TSI_WEEK"
MONTH_SYM ::= "SQL_TSI_MONTH"
QUARTER_SYM ::= "SQL_TSI_QUARTER"
YEAR_SYM ::= "SQL_TSI_YEAR"
SRID_SYM ::= "SRID"
SSL_SYM ::= "SSL"
STACKED_SYM ::= "STACKED"
START_SYM ::= "START"
STARTING ::= "STARTING"
STARTS_SYM ::= "STARTS"
STATS_AUTO_RECALC_SYM ::= "STATS_AUTO_RECALC"
STATS_PERSISTENT_SYM ::= "STATS_PERSISTENT"
STATS_SAMPLE_PAGES_SYM ::= "STATS_SAMPLE_PAGES"
STATUS_SYM ::= "STATUS"
STOP_SYM ::= "STOP"
STORAGE_SYM ::= "STORAGE"
STORED_SYM ::= "STORED"
STRAIGHT_JOIN ::= "STRAIGHT_JOIN"
STREAM_SYM ::= "STREAM"
STRING_SYM ::= "STRING"
SUBCLASS_ORIGIN_SYM ::= "SUBCLASS_ORIGIN"
SUBJECT_SYM ::= "SUBJECT"
SUBPARTITION_SYM ::= "SUBPARTITION"
SUBPARTITIONS_SYM ::= "SUBPARTITIONS"
SUPER_SYM ::= "SUPER"
SUSPEND_SYM ::= "SUSPEND"
SWAPS_SYM ::= "SWAPS"
SWITCHES_SYM ::= "SWITCHES"
SYSTEM_SYM ::= "SYSTEM"
TABLE_SYM ::= "TABLE"
TABLE_NAME_SYM ::= "TABLE_NAME"
TABLES ::= "TABLES"
TABLESPACE_SYM ::= "TABLESPACE"
TABLE_CHECKSUM_SYM ::= "TABLE_CHECKSUM"
TABLE_STATS_SYM ::= "TABLE_STATISTICS"
TEMPORARY ::= "TEMPORARY"
TEMPTABLE_SYM ::= "TEMPTABLE"
TERMINATED ::= "TERMINATED"
TEXT_SYM ::= "TEXT"
THAN_SYM ::= "THAN"
THEN_SYM ::= "THEN"
THREAD_PRIORITY_SYM ::= "THREAD_PRIORITY"
THREAD_STATS_SYM ::= "THREAD_STATISTICS"
TIES_SYM ::= "TIES"
TIME_SYM ::= "TIME"
TIMESTAMP_SYM ::= "TIMESTAMP"
TIMESTAMP_ADD ::= "TIMESTAMPADD"
TIMESTAMP_DIFF ::= "TIMESTAMPDIFF"
TINYBLOB_SYM ::= "TINYBLOB"
TINYINT_SYM ::= "TINYINT"
TINYTEXT_SYN ::= "TINYTEXT"
TLS_SYM ::= "TLS"
TO_SYM ::= "TO"
TRAILING ::= "TRAILING"
TRANSACTION_SYM ::= "TRANSACTION"
TRIGGER_SYM ::= "TRIGGER"
TRIGGERS_SYM ::= "TRIGGERS"
TRUE_SYM ::= "TRUE"
TRUNCATE_SYM ::= "TRUNCATE"
TYPE_SYM ::= "TYPE"
TYPES_SYM ::= "TYPES"
UNBOUNDED_SYM ::= "UNBOUNDED"
UNCOMMITTED_SYM ::= "UNCOMMITTED"
UNDEFINED_SYM ::= "UNDEFINED"
UNDO_BUFFER_SIZE_SYM ::= "UNDO_BUFFER_SIZE"
UNDOFILE_SYM ::= "UNDOFILE"
UNDO_SYM ::= "UNDO"
UNICODE_SYM ::= "UNICODE"
UNION_SYM ::= "UNION"
UNIQUE_SYM ::= "UNIQUE"
UNKNOWN_SYM ::= "UNKNOWN"
UNLOCK_SYM ::= "UNLOCK"
UNINSTALL_SYM ::= "UNINSTALL"
UNSIGNED_SYM ::= "UNSIGNED"
UNTIL_SYM ::= "UNTIL"
UPGRADE_SYM ::= "UPGRADE"
USAGE ::= "USAGE"
USE_SYM ::= "USE"
USER ::= "USER"
RESOURCES ::= "USER_RESOURCES"
USER_STATS_SYM ::= "USER_STATISTICS"
USE_FRM ::= "USE_FRM"
USING ::= "USING"
UTC_DATE_SYM ::= "UTC_DATE"
UTC_TIME_SYM ::= "UTC_TIME"
UTC_TIMESTAMP_SYM ::= "UTC_TIMESTAMP"
VALIDATION_SYM ::= "VALIDATION"
VALUE_SYM ::= "VALUE"
VALUES ::= "VALUES"
VARBINARY_SYM ::= "VARBINARY"
VARCHAR_SYM ::= "VARCHAR"
VARCHAR_SYM ::= "VARCHARACTER"
VARIABLES ::= "VARIABLES"
VARYING ::= "VARYING"
WAIT_SYM ::= "WAIT"
WARNINGS ::= "WARNINGS"
WEEK_SYM ::= "WEEK"
WEIGHT_STRING_SYM ::= "WEIGHT_STRING"
WHEN_SYM ::= "WHEN"
WHERE ::= "WHERE"
WHILE_SYM ::= "WHILE"
WINDOW_SYM ::= "WINDOW"
VCPU_SYM ::= "VCPU"
VIEW_SYM ::= "VIEW"
VIRTUAL_SYM ::= "VIRTUAL"
VISIBLE_SYM ::= "VISIBLE"
WITH ::= "WITH"
WITHOUT_SYM ::= "WITHOUT"
WORK_SYM ::= "WORK"
WRAPPER_SYM ::= "WRAPPER"
WRITE_SYM ::= "WRITE"
X509_SYM ::= "X509"
XOR ::= "XOR"
XA_SYM ::= "XA"
XID_SYM ::= "XID"
XML_SYM ::= "XML"
YEAR_SYM ::= "YEAR"
YEAR_MONTH_SYM ::= "YEAR_MONTH"
ZEROFILL_SYM ::= "ZEROFILL"
ZONE_SYM ::= "ZONE"
OR_OR_SYM ::= "||"
/*
Place keywords that accept optimizer hints below this comment.
*/
DELETE_SYM ::= "DELETE"
INSERT_SYM ::= "INSERT"
REPLACE_SYM ::= "REPLACE"
SELECT_SYM ::= "SELECT"
UPDATE_SYM ::= "UPDATE"
OPTIMIZE ::= "OPTIMIZE"
CALL_SYM ::= "CALL"
ALTER ::= "ALTER"
ANALYZE_SYM ::= "ANALYZE"
CHECK_SYM ::= "CHECK"
LOAD ::= "LOAD"
CREATE ::= "CREATE"
/*
Insert new function definitions after that commentary (by alphabetical
order)
*/
ADDDATE_SYM ::= "ADDDATE"
BIT_AND_SYM ::= "BIT_AND"
BIT_OR_SYM ::= "BIT_OR"
BIT_XOR_SYM ::= "BIT_XOR"
CAST_SYM ::= "CAST"
COUNT_SYM ::= "COUNT"
CURDATE ::= "CURDATE"
CURTIME ::= "CURTIME"
DATE_ADD_INTERVAL ::= "DATE_ADD"
DATE_SUB_INTERVAL ::= "DATE_SUB"
EXTRACT_SYM ::= "EXTRACT"
GROUP_CONCAT_SYM ::= "GROUP_CONCAT"
JSON_OBJECTAGG ::= "JSON_OBJECTAGG"
JSON_ARRAYAGG ::= "JSON_ARRAYAGG"
MAX_SYM ::= "MAX"
SUBSTRING ::= "MID"
MIN_SYM ::= "MIN"
NOW_SYM ::= "NOW"
POSITION_SYM ::= "POSITION"
USER ::= "SESSION_USER"
STD_SYM ::= "STD"
STD_SYM ::= "STDDEV"
STD_SYM ::= "STDDEV_POP"
STDDEV_SAMP_SYM ::= "STDDEV_SAMP"
SUBDATE_SYM ::= "SUBDATE"
SUBSTRING ::= "SUBSTR"
SUBSTRING ::= "SUBSTRING"
SUM_SYM ::= "SUM"
SYSDATE ::= "SYSDATE"
USER ::= "SYSTEM_USER"
TRIM ::= "TRIM"
VARIANCE_SYM ::= "VARIANCE"
VARIANCE_SYM ::= "VAR_POP"
VAR_SAMP_SYM ::= "VAR_SAMP"
/*
Insert new optimizer hint keywords after that commentary:
*/
BKA_HINT ::= "BKA"
BNL_HINT ::= "BNL"
DUPSWEEDOUT_HINT ::= "DUPSWEEDOUT"
FIRSTMATCH_HINT ::= "FIRSTMATCH"
INTOEXISTS_HINT ::= "INTOEXISTS"
LOOSESCAN_HINT ::= "LOOSESCAN"
MATERIALIZATION_HINT ::= "MATERIALIZATION"
MAX_EXECUTION_TIME_HINT ::= "MAX_EXECUTION_TIME"
NO_BKA_HINT ::= "NO_BKA"
NO_BNL_HINT ::= "NO_BNL"
NO_ICP_HINT ::= "NO_ICP"
NO_MRR_HINT ::= "NO_MRR"
NO_RANGE_OPTIMIZATION_HINT ::= "NO_RANGE_OPTIMIZATION"
NO_SEMIJOIN_HINT ::= "NO_SEMIJOIN"
MRR_HINT ::= "MRR"
QB_NAME_HINT ::= "QB_NAME"
SEMIJOIN_HINT ::= "SEMIJOIN"
SET_VAR_HINT ::= "SET_VAR"
SUBQUERY_HINT ::= "SUBQUERY"
DERIVED_MERGE_HINT ::= "MERGE"
NO_DERIVED_MERGE_HINT ::= "NO_MERGE"
JOIN_PREFIX_HINT ::= "JOIN_PREFIX"
JOIN_SUFFIX_HINT ::= "JOIN_SUFFIX"
JOIN_ORDER_HINT ::= "JOIN_ORDER"
JOIN_FIXED_ORDER_HINT ::= "JOIN_FIXED_ORDER"
INDEX_MERGE_HINT ::= "INDEX_MERGE"
NO_INDEX_MERGE_HINT ::= "NO_INDEX_MERGE"
RESOURCE_GROUP_HINT ::= "RESOURCE_GROUP"
SKIP_SCAN_HINT ::= "SKIP_SCAN"
NO_SKIP_SCAN_HINT ::= "NO_SKIP_SCAN"
HASH_JOIN_HINT ::= "HASH_JOIN"
NO_HASH_JOIN_HINT ::= "NO_HASH_JOIN"
INDEX_HINT ::= "INDEX"
NO_INDEX_HINT ::= "NO_INDEX"
JOIN_INDEX_HINT ::= "JOIN_INDEX"
NO_JOIN_INDEX_HINT ::= "NO_JOIN_INDEX"
GROUP_INDEX_HINT ::= "GROUP_INDEX"
NO_GROUP_INDEX_HINT ::= "NO_GROUP_INDEX"
ORDER_INDEX_HINT ::= "ORDER_INDEX"
NO_ORDER_INDEX_HINT ::= "NO_ORDER_INDEX"
DERIVED_CONDITION_PUSHDOWN_HINT ::= "DERIVED_CONDITION_PUSHDOWN"
NO_DERIVED_CONDITION_PUSHDOWN_HINT ::= "NO_DERIVED_CONDITION_PUSHDOWN"
====
09:27 Reply: Whole grammar railroad diagram (artifact: 28205e4e02 user: mingodad)
I'm having trouble to login to postgresql mailing list and because sqlite follow somehow postgresql footsteps I'm posting here the postgresql 13.3 whole grammar EBNF to help comparisons.

EBNF for https://www.bottlecaps.de/rr/ui :
====
/*
From postgresql-13.3/src/backend/parser/gram.y
*/

stmtblock ::= stmtmulti
stmtmulti ::= stmtmulti ';' stmt | stmt
stmt ::= AlterEventTrigStmt | AlterCollationStmt | AlterDatabaseStmt | AlterDatabaseSetStmt | AlterDefaultPrivilegesStmt | AlterDomainStmt | AlterEnumStmt | AlterExtensionStmt | AlterExtensionContentsStmt | AlterFdwStmt | AlterForeignServerStmt | AlterForeignTableStmt | AlterFunctionStmt | AlterGroupStmt | AlterObjectDependsStmt | AlterObjectSchemaStmt | AlterOwnerStmt | AlterOperatorStmt | AlterTypeStmt | AlterPolicyStmt | AlterSeqStmt | AlterSystemStmt | AlterTableStmt | AlterTblSpcStmt | AlterCompositeTypeStmt | AlterPublicationStmt | AlterRoleSetStmt | AlterRoleStmt | AlterSubscriptionStmt | AlterStatsStmt | AlterTSConfigurationStmt | AlterTSDictionaryStmt | AlterUserMappingStmt | AnalyzeStmt | CallStmt | CheckPointStmt | ClosePortalStmt | ClusterStmt | CommentStmt | ConstraintsSetStmt | CopyStmt | CreateAmStmt | CreateAsStmt | CreateAssertionStmt | CreateCastStmt | CreateConversionStmt | CreateDomainStmt | CreateExtensionStmt | CreateFdwStmt | CreateForeignServerStmt | CreateForeignTableStmt | CreateFunctionStmt | CreateGroupStmt | CreateMatViewStmt | CreateOpClassStmt | CreateOpFamilyStmt | CreatePublicationStmt | AlterOpFamilyStmt | CreatePolicyStmt | CreatePLangStmt | CreateSchemaStmt | CreateSeqStmt | CreateStmt | CreateSubscriptionStmt | CreateStatsStmt | CreateTableSpaceStmt | CreateTransformStmt | CreateTrigStmt | CreateEventTrigStmt | CreateRoleStmt | CreateUserStmt | CreateUserMappingStmt | CreatedbStmt | DeallocateStmt | DeclareCursorStmt | DefineStmt | DeleteStmt | DiscardStmt | DoStmt | DropCastStmt | DropOpClassStmt | DropOpFamilyStmt | DropOwnedStmt | DropPLangStmt | DropStmt | DropSubscriptionStmt | DropTableSpaceStmt | DropTransformStmt | DropRoleStmt | DropUserMappingStmt | DropdbStmt | ExecuteStmt | ExplainStmt | FetchStmt | GrantStmt | GrantRoleStmt | ImportForeignSchemaStmt | IndexStmt | InsertStmt | ListenStmt | RefreshMatViewStmt | LoadStmt | LockStmt | NotifyStmt | PrepareStmt | ReassignOwnedStmt | ReindexStmt | RemoveAggrStmt | RemoveFuncStmt | RemoveOperStmt | RenameStmt | RevokeStmt | RevokeRoleStmt | RuleStmt | SecLabelStmt | SelectStmt | TransactionStmt | TruncateStmt | UnlistenStmt | UpdateStmt | VacuumStmt | VariableResetStmt | VariableSetStmt | VariableShowStmt | ViewStmt |
CallStmt ::= CALL func_application
CreateRoleStmt ::= CREATE ROLE RoleId opt_with OptRoleList
opt_with ::= WITH | WITH_LA |
OptRoleList ::= OptRoleList CreateOptRoleElem |
AlterOptRoleList ::= AlterOptRoleList AlterOptRoleElem |
AlterOptRoleElem ::= PASSWORD Sconst | PASSWORD NULL_P | ENCRYPTED PASSWORD Sconst | UNENCRYPTED PASSWORD Sconst | INHERIT | CONNECTION LIMIT SignedIconst | VALID UNTIL Sconst | USER role_list | IDENT
CreateOptRoleElem ::= AlterOptRoleElem | SYSID Iconst | ADMIN role_list | ROLE role_list | IN_P ROLE role_list | IN_P GROUP_P role_list
CreateUserStmt ::= CREATE USER RoleId opt_with OptRoleList
AlterRoleStmt ::= ALTER ROLE RoleSpec opt_with AlterOptRoleList | ALTER USER RoleSpec opt_with AlterOptRoleList
opt_in_database ::= | IN_P DATABASE database_name
AlterRoleSetStmt ::= ALTER ROLE RoleSpec opt_in_database SetResetClause | ALTER ROLE ALL opt_in_database SetResetClause | ALTER USER RoleSpec opt_in_database SetResetClause | ALTER USER ALL opt_in_database SetResetClause
DropRoleStmt ::= DROP ROLE role_list | DROP ROLE IF_P EXISTS role_list | DROP USER role_list | DROP USER IF_P EXISTS role_list | DROP GROUP_P role_list | DROP GROUP_P IF_P EXISTS role_list
CreateGroupStmt ::= CREATE GROUP_P RoleId opt_with OptRoleList
AlterGroupStmt ::= ALTER GROUP_P RoleSpec add_drop USER role_list
add_drop ::= ADD_P | DROP
CreateSchemaStmt ::= CREATE SCHEMA OptSchemaName AUTHORIZATION RoleSpec OptSchemaEltList | CREATE SCHEMA ColId OptSchemaEltList | CREATE SCHEMA IF_P NOT EXISTS OptSchemaName AUTHORIZATION RoleSpec OptSchemaEltList | CREATE SCHEMA IF_P NOT EXISTS ColId OptSchemaEltList
OptSchemaName ::= ColId |
OptSchemaEltList ::= OptSchemaEltList schema_stmt |
schema_stmt ::= CreateStmt | IndexStmt | CreateSeqStmt | CreateTrigStmt | GrantStmt | ViewStmt
VariableSetStmt ::= SET set_rest | SET LOCAL set_rest | SET SESSION set_rest
set_rest ::= TRANSACTION transaction_mode_list | SESSION CHARACTERISTICS AS TRANSACTION transaction_mode_list | set_rest_more
generic_set ::= var_name TO var_list | var_name '=' var_list | var_name TO DEFAULT | var_name '=' DEFAULT
set_rest_more ::= generic_set | var_name FROM CURRENT_P | TIME ZONE zone_value | CATALOG_P Sconst | SCHEMA Sconst | NAMES opt_encoding | ROLE NonReservedWord_or_Sconst | SESSION AUTHORIZATION NonReservedWord_or_Sconst | SESSION AUTHORIZATION DEFAULT | XML_P OPTION document_or_content | TRANSACTION SNAPSHOT Sconst
var_name ::= ColId | var_name '.' ColId
var_list ::= var_value | var_list ',' var_value
var_value ::= opt_boolean_or_string | NumericOnly
iso_level ::= READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE
opt_boolean_or_string ::= TRUE_P | FALSE_P | ON | NonReservedWord_or_Sconst
zone_value ::= Sconst | IDENT | ConstInterval Sconst opt_interval | ConstInterval '(' Iconst ')' Sconst | NumericOnly | DEFAULT | LOCAL
opt_encoding ::= Sconst | DEFAULT |
NonReservedWord_or_Sconst ::= NonReservedWord | Sconst
VariableResetStmt ::= RESET reset_rest
reset_rest ::= generic_reset | TIME ZONE | TRANSACTION ISOLATION LEVEL | SESSION AUTHORIZATION
generic_reset ::= var_name | ALL
SetResetClause ::= SET set_rest | VariableResetStmt
FunctionSetResetClause ::= SET set_rest_more | VariableResetStmt
VariableShowStmt ::= SHOW var_name | SHOW TIME ZONE | SHOW TRANSACTION ISOLATION LEVEL | SHOW SESSION AUTHORIZATION | SHOW ALL
ConstraintsSetStmt ::= SET CONSTRAINTS constraints_set_list constraints_set_mode
constraints_set_list ::= ALL | qualified_name_list
constraints_set_mode ::= DEFERRED | IMMEDIATE
CheckPointStmt ::= CHECKPOINT
DiscardStmt ::= DISCARD ALL | DISCARD TEMP | DISCARD TEMPORARY | DISCARD PLANS | DISCARD SEQUENCES
AlterTableStmt ::= ALTER TABLE relation_expr alter_table_cmds | ALTER TABLE IF_P EXISTS relation_expr alter_table_cmds | ALTER TABLE relation_expr partition_cmd | ALTER TABLE IF_P EXISTS relation_expr partition_cmd | ALTER TABLE ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait | ALTER TABLE ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait | ALTER INDEX qualified_name alter_table_cmds | ALTER INDEX IF_P EXISTS qualified_name alter_table_cmds | ALTER INDEX qualified_name index_partition_cmd | ALTER INDEX ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait | ALTER INDEX ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait | ALTER SEQUENCE qualified_name alter_table_cmds | ALTER SEQUENCE IF_P EXISTS qualified_name alter_table_cmds | ALTER VIEW qualified_name alter_table_cmds | ALTER VIEW IF_P EXISTS qualified_name alter_table_cmds | ALTER MATERIALIZED VIEW qualified_name alter_table_cmds | ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name alter_table_cmds | ALTER MATERIALIZED VIEW ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait | ALTER MATERIALIZED VIEW ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait
alter_table_cmds ::= alter_table_cmd | alter_table_cmds ',' alter_table_cmd
partition_cmd ::= ATTACH PARTITION qualified_name PartitionBoundSpec | DETACH PARTITION qualified_name
index_partition_cmd ::= ATTACH PARTITION qualified_name
alter_table_cmd ::= ADD_P columnDef | ADD_P IF_P NOT EXISTS columnDef | ADD_P COLUMN columnDef | ADD_P COLUMN IF_P NOT EXISTS columnDef | ALTER opt_column ColId alter_column_default | ALTER opt_column ColId DROP NOT NULL_P | ALTER opt_column ColId SET NOT NULL_P | ALTER opt_column ColId DROP EXPRESSION | ALTER opt_column ColId DROP EXPRESSION IF_P EXISTS | ALTER opt_column ColId SET STATISTICS SignedIconst | ALTER opt_column Iconst SET STATISTICS SignedIconst | ALTER opt_column ColId SET reloptions | ALTER opt_column ColId RESET reloptions | ALTER opt_column ColId SET STORAGE ColId | ALTER opt_column ColId ADD_P GENERATED generated_when AS IDENTITY_P OptParenthesizedSeqOptList | ALTER opt_column ColId alter_identity_column_option_list | ALTER opt_column ColId DROP IDENTITY_P | ALTER opt_column ColId DROP IDENTITY_P IF_P EXISTS | DROP opt_column IF_P EXISTS ColId opt_drop_behavior | DROP opt_column ColId opt_drop_behavior | ALTER opt_column ColId opt_set_data TYPE_P Typename opt_collate_clause alter_using | ALTER opt_column ColId alter_generic_options | ADD_P TableConstraint | ALTER CONSTRAINT name ConstraintAttributeSpec | VALIDATE CONSTRAINT name | DROP CONSTRAINT IF_P EXISTS name opt_drop_behavior | DROP CONSTRAINT name opt_drop_behavior | SET WITHOUT OIDS | CLUSTER ON name | SET WITHOUT CLUSTER | SET LOGGED | SET UNLOGGED | ENABLE_P TRIGGER name | ENABLE_P ALWAYS TRIGGER name | ENABLE_P REPLICA TRIGGER name | ENABLE_P TRIGGER ALL | ENABLE_P TRIGGER USER | DISABLE_P TRIGGER name | DISABLE_P TRIGGER ALL | DISABLE_P TRIGGER USER | ENABLE_P RULE name | ENABLE_P ALWAYS RULE name | ENABLE_P REPLICA RULE name | DISABLE_P RULE name | INHERIT qualified_name | NO INHERIT qualified_name | OF any_name | NOT OF | OWNER TO RoleSpec | SET TABLESPACE name | SET reloptions | RESET reloptions | REPLICA IDENTITY_P replica_identity | ENABLE_P ROW LEVEL SECURITY | DISABLE_P ROW LEVEL SECURITY | FORCE ROW LEVEL SECURITY | NO FORCE ROW LEVEL SECURITY | alter_generic_options
alter_column_default ::= SET DEFAULT a_expr | DROP DEFAULT
opt_drop_behavior ::= CASCADE | RESTRICT |
opt_collate_clause ::= COLLATE any_name |
alter_using ::= USING a_expr |
replica_identity ::= NOTHING | FULL | DEFAULT | USING INDEX name
reloptions ::= '(' reloption_list ')'
opt_reloptions ::= WITH reloptions |
reloption_list ::= reloption_elem | reloption_list ',' reloption_elem
reloption_elem ::= ColLabel '=' def_arg | ColLabel | ColLabel '.' ColLabel '=' def_arg | ColLabel '.' ColLabel
alter_identity_column_option_list ::= alter_identity_column_option | alter_identity_column_option_list alter_identity_column_option
alter_identity_column_option ::= RESTART | RESTART opt_with NumericOnly | SET SeqOptElem | SET GENERATED generated_when
PartitionBoundSpec ::= FOR VALUES WITH '(' hash_partbound ')' | FOR VALUES IN_P '(' expr_list ')' | FOR VALUES FROM '(' expr_list ')' TO '(' expr_list ')' | DEFAULT
hash_partbound_elem ::= NonReservedWord Iconst
hash_partbound ::= hash_partbound_elem | hash_partbound ',' hash_partbound_elem
AlterCompositeTypeStmt ::= ALTER TYPE_P any_name alter_type_cmds
alter_type_cmds ::= alter_type_cmd | alter_type_cmds ',' alter_type_cmd
alter_type_cmd ::= ADD_P ATTRIBUTE TableFuncElement opt_drop_behavior | DROP ATTRIBUTE IF_P EXISTS ColId opt_drop_behavior | DROP ATTRIBUTE ColId opt_drop_behavior | ALTER ATTRIBUTE ColId opt_set_data TYPE_P Typename opt_collate_clause opt_drop_behavior
ClosePortalStmt ::= CLOSE cursor_name | CLOSE ALL
CopyStmt ::= COPY opt_binary qualified_name opt_column_list copy_from opt_program copy_file_name copy_delimiter opt_with copy_options where_clause | COPY '(' PreparableStmt ')' TO opt_program copy_file_name opt_with copy_options
copy_from ::= FROM | TO
opt_program ::= PROGRAM |
copy_file_name ::= Sconst | STDIN | STDOUT
copy_options ::= copy_opt_list | '(' copy_generic_opt_list ')'
copy_opt_list ::= copy_opt_list copy_opt_item |
copy_opt_item ::= BINARY | FREEZE | DELIMITER opt_as Sconst | NULL_P opt_as Sconst | CSV | HEADER_P | QUOTE opt_as Sconst | ESCAPE opt_as Sconst | FORCE QUOTE columnList | FORCE QUOTE '*' | FORCE NOT NULL_P columnList | FORCE NULL_P columnList | ENCODING Sconst
opt_binary ::= BINARY |
copy_delimiter ::= opt_using DELIMITERS Sconst |
opt_using ::= USING |
copy_generic_opt_list ::= copy_generic_opt_elem | copy_generic_opt_list ',' copy_generic_opt_elem
copy_generic_opt_elem ::= ColLabel copy_generic_opt_arg
copy_generic_opt_arg ::= opt_boolean_or_string | NumericOnly | '*' | '(' copy_generic_opt_arg_list ')' |
copy_generic_opt_arg_list ::= copy_generic_opt_arg_list_item | copy_generic_opt_arg_list ',' copy_generic_opt_arg_list_item
copy_generic_opt_arg_list_item ::= opt_boolean_or_string
CreateStmt ::= CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')' OptInherit OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace | CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name '(' OptTableElementList ')' OptInherit OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace | CREATE OptTemp TABLE qualified_name OF any_name OptTypedTableElementList OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace | CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name OF any_name OptTypedTableElementList OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace | CREATE OptTemp TABLE qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace | CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace
OptTemp ::= TEMPORARY | TEMP | LOCAL TEMPORARY | LOCAL TEMP | GLOBAL TEMPORARY | GLOBAL TEMP | UNLOGGED |
OptTableElementList ::= TableElementList |
OptTypedTableElementList ::= '(' TypedTableElementList ')' |
TableElementList ::= TableElement | TableElementList ',' TableElement
TypedTableElementList ::= TypedTableElement | TypedTableElementList ',' TypedTableElement
TableElement ::= columnDef | TableLikeClause | TableConstraint
TypedTableElement ::= columnOptions | TableConstraint
columnDef ::= ColId Typename create_generic_options ColQualList
columnOptions ::= ColId ColQualList | ColId WITH OPTIONS ColQualList
ColQualList ::= ColQualList ColConstraint |
ColConstraint ::= CONSTRAINT name ColConstraintElem | ColConstraintElem | ConstraintAttr | COLLATE any_name
ColConstraintElem ::= NOT NULL_P | NULL_P | UNIQUE opt_definition OptConsTableSpace | PRIMARY KEY opt_definition OptConsTableSpace | CHECK '(' a_expr ')' opt_no_inherit | DEFAULT b_expr | GENERATED generated_when AS IDENTITY_P OptParenthesizedSeqOptList | GENERATED generated_when AS '(' a_expr ')' STORED | REFERENCES qualified_name opt_column_list key_match key_actions
generated_when ::= ALWAYS | BY DEFAULT
ConstraintAttr ::= DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE
TableLikeClause ::= LIKE qualified_name TableLikeOptionList
TableLikeOptionList ::= TableLikeOptionList INCLUDING TableLikeOption | TableLikeOptionList EXCLUDING TableLikeOption |
TableLikeOption ::= COMMENTS | CONSTRAINTS | DEFAULTS | IDENTITY_P | GENERATED | INDEXES | STATISTICS | STORAGE | ALL
TableConstraint ::= CONSTRAINT name ConstraintElem | ConstraintElem
ConstraintElem ::= CHECK '(' a_expr ')' ConstraintAttributeSpec | UNIQUE '(' columnList ')' opt_c_include opt_definition OptConsTableSpace ConstraintAttributeSpec | UNIQUE ExistingIndex ConstraintAttributeSpec | PRIMARY KEY '(' columnList ')' opt_c_include opt_definition OptConsTableSpace ConstraintAttributeSpec | PRIMARY KEY ExistingIndex ConstraintAttributeSpec | EXCLUDE access_method_clause '(' ExclusionConstraintList ')' opt_c_include opt_definition OptConsTableSpace ExclusionWhereClause ConstraintAttributeSpec | FOREIGN KEY '(' columnList ')' REFERENCES qualified_name opt_column_list key_match key_actions ConstraintAttributeSpec
opt_no_inherit ::= NO INHERIT |
opt_column_list ::= '(' columnList ')' |
columnList ::= columnElem | columnList ',' columnElem
columnElem ::= ColId
opt_c_include ::= INCLUDE '(' columnList ')' |
key_match ::= MATCH FULL | MATCH PARTIAL | MATCH SIMPLE |
ExclusionConstraintList ::= ExclusionConstraintElem | ExclusionConstraintList ',' ExclusionConstraintElem
ExclusionConstraintElem ::= index_elem WITH any_operator | index_elem WITH OPERATOR '(' any_operator ')'
ExclusionWhereClause ::= WHERE '(' a_expr ')' |
key_actions ::= key_update | key_delete | key_update key_delete | key_delete key_update |
key_update ::= ON UPDATE key_action
key_delete ::= ON DELETE_P key_action
key_action ::= NO ACTION | RESTRICT | CASCADE | SET NULL_P | SET DEFAULT
OptInherit ::= INHERITS '(' qualified_name_list ')' |
OptPartitionSpec ::= PartitionSpec |
PartitionSpec ::= PARTITION BY ColId '(' part_params ')'
part_params ::= part_elem | part_params ',' part_elem
part_elem ::= ColId opt_collate opt_class | func_expr_windowless opt_collate opt_class | '(' a_expr ')' opt_collate opt_class
table_access_method_clause ::= USING access_method |
OptWith ::= WITH reloptions | WITHOUT OIDS |
OnCommitOption ::= ON COMMIT DROP | ON COMMIT DELETE_P ROWS | ON COMMIT PRESERVE ROWS |
OptTableSpace ::= TABLESPACE name |
OptConsTableSpace ::= USING INDEX TABLESPACE name |
ExistingIndex ::= USING INDEX index_name
CreateStatsStmt ::= CREATE STATISTICS any_name opt_name_list ON expr_list FROM from_list | CREATE STATISTICS IF_P NOT EXISTS any_name opt_name_list ON expr_list FROM from_list
AlterStatsStmt ::= ALTER STATISTICS any_name SET STATISTICS SignedIconst | ALTER STATISTICS IF_P EXISTS any_name SET STATISTICS SignedIconst
CreateAsStmt ::= CREATE OptTemp TABLE create_as_target AS SelectStmt opt_with_data | CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS SelectStmt opt_with_data
create_as_target ::= qualified_name opt_column_list table_access_method_clause OptWith OnCommitOption OptTableSpace
opt_with_data ::= WITH DATA_P | WITH NO DATA_P |
CreateMatViewStmt ::= CREATE OptNoLog MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data | CREATE OptNoLog MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data
create_mv_target ::= qualified_name opt_column_list table_access_method_clause opt_reloptions OptTableSpace
OptNoLog ::= UNLOGGED |
RefreshMatViewStmt ::= REFRESH MATERIALIZED VIEW opt_concurrently qualified_name opt_with_data
CreateSeqStmt ::= CREATE OptTemp SEQUENCE qualified_name OptSeqOptList | CREATE OptTemp SEQUENCE IF_P NOT EXISTS qualified_name OptSeqOptList
AlterSeqStmt ::= ALTER SEQUENCE qualified_name SeqOptList | ALTER SEQUENCE IF_P EXISTS qualified_name SeqOptList
OptSeqOptList ::= SeqOptList |
OptParenthesizedSeqOptList ::= '(' SeqOptList ')' |
SeqOptList ::= SeqOptElem | SeqOptList SeqOptElem
SeqOptElem ::= AS SimpleTypename | CACHE NumericOnly | CYCLE | NO CYCLE | INCREMENT opt_by NumericOnly | MAXVALUE NumericOnly | MINVALUE NumericOnly | NO MAXVALUE | NO MINVALUE | OWNED BY any_name | SEQUENCE NAME_P any_name | START opt_with NumericOnly | RESTART | RESTART opt_with NumericOnly
opt_by ::= BY |
NumericOnly ::= FCONST | '+' FCONST | '-' FCONST | SignedIconst
NumericOnly_list ::= NumericOnly | NumericOnly_list ',' NumericOnly
CreatePLangStmt ::= CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE NonReservedWord_or_Sconst | CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE NonReservedWord_or_Sconst HANDLER handler_name opt_inline_handler opt_validator
opt_trusted ::= TRUSTED |
handler_name ::= name | name attrs
opt_inline_handler ::= INLINE_P handler_name |
validator_clause ::= VALIDATOR handler_name | NO VALIDATOR
opt_validator ::= validator_clause |
DropPLangStmt ::= DROP opt_procedural LANGUAGE NonReservedWord_or_Sconst opt_drop_behavior | DROP opt_procedural LANGUAGE IF_P EXISTS NonReservedWord_or_Sconst opt_drop_behavior
opt_procedural ::= PROCEDURAL |
CreateTableSpaceStmt ::= CREATE TABLESPACE name OptTableSpaceOwner LOCATION Sconst opt_reloptions
OptTableSpaceOwner ::= OWNER RoleSpec |
DropTableSpaceStmt ::= DROP TABLESPACE name | DROP TABLESPACE IF_P EXISTS name
CreateExtensionStmt ::= CREATE EXTENSION name opt_with create_extension_opt_list | CREATE EXTENSION IF_P NOT EXISTS name opt_with create_extension_opt_list
create_extension_opt_list ::= create_extension_opt_list create_extension_opt_item |
create_extension_opt_item ::= SCHEMA name | VERSION_P NonReservedWord_or_Sconst | FROM NonReservedWord_or_Sconst | CASCADE
AlterExtensionStmt ::= ALTER EXTENSION name UPDATE alter_extension_opt_list
alter_extension_opt_list ::= alter_extension_opt_list alter_extension_opt_item |
alter_extension_opt_item ::= TO NonReservedWord_or_Sconst
AlterExtensionContentsStmt ::= ALTER EXTENSION name add_drop ACCESS METHOD name | ALTER EXTENSION name add_drop AGGREGATE aggregate_with_argtypes | ALTER EXTENSION name add_drop CAST '(' Typename AS Typename ')' | ALTER EXTENSION name add_drop COLLATION any_name | ALTER EXTENSION name add_drop CONVERSION_P any_name | ALTER EXTENSION name add_drop DOMAIN_P Typename | ALTER EXTENSION name add_drop FUNCTION function_with_argtypes | ALTER EXTENSION name add_drop opt_procedural LANGUAGE name | ALTER EXTENSION name add_drop OPERATOR operator_with_argtypes | ALTER EXTENSION name add_drop OPERATOR CLASS any_name USING access_method | ALTER EXTENSION name add_drop OPERATOR FAMILY any_name USING access_method | ALTER EXTENSION name add_drop PROCEDURE function_with_argtypes | ALTER EXTENSION name add_drop ROUTINE function_with_argtypes | ALTER EXTENSION name add_drop SCHEMA name | ALTER EXTENSION name add_drop EVENT TRIGGER name | ALTER EXTENSION name add_drop TABLE any_name | ALTER EXTENSION name add_drop TEXT_P SEARCH PARSER any_name | ALTER EXTENSION name add_drop TEXT_P SEARCH DICTIONARY any_name | ALTER EXTENSION name add_drop TEXT_P SEARCH TEMPLATE any_name | ALTER EXTENSION name add_drop TEXT_P SEARCH CONFIGURATION any_name | ALTER EXTENSION name add_drop SEQUENCE any_name | ALTER EXTENSION name add_drop VIEW any_name | ALTER EXTENSION name add_drop MATERIALIZED VIEW any_name | ALTER EXTENSION name add_drop FOREIGN TABLE any_name | ALTER EXTENSION name add_drop FOREIGN DATA_P WRAPPER name | ALTER EXTENSION name add_drop SERVER name | ALTER EXTENSION name add_drop TRANSFORM FOR Typename LANGUAGE name | ALTER EXTENSION name add_drop TYPE_P Typename
CreateFdwStmt ::= CREATE FOREIGN DATA_P WRAPPER name opt_fdw_options create_generic_options
fdw_option ::= HANDLER handler_name | NO HANDLER | VALIDATOR handler_name | NO VALIDATOR
fdw_options ::= fdw_option | fdw_options fdw_option
opt_fdw_options ::= fdw_options |
AlterFdwStmt ::= ALTER FOREIGN DATA_P WRAPPER name opt_fdw_options alter_generic_options | ALTER FOREIGN DATA_P WRAPPER name fdw_options
create_generic_options ::= OPTIONS '(' generic_option_list ')' |
generic_option_list ::= generic_option_elem | generic_option_list ',' generic_option_elem
alter_generic_options ::= OPTIONS '(' alter_generic_option_list ')'
alter_generic_option_list ::= alter_generic_option_elem | alter_generic_option_list ',' alter_generic_option_elem
alter_generic_option_elem ::= generic_option_elem | SET generic_option_elem | ADD_P generic_option_elem | DROP generic_option_name
generic_option_elem ::= generic_option_name generic_option_arg
generic_option_name ::= ColLabel
generic_option_arg ::= Sconst
CreateForeignServerStmt ::= CREATE SERVER name opt_type opt_foreign_server_version FOREIGN DATA_P WRAPPER name create_generic_options | CREATE SERVER IF_P NOT EXISTS name opt_type opt_foreign_server_version FOREIGN DATA_P WRAPPER name create_generic_options
opt_type ::= TYPE_P Sconst |
foreign_server_version ::= VERSION_P Sconst | VERSION_P NULL_P
opt_foreign_server_version ::= foreign_server_version |
AlterForeignServerStmt ::= ALTER SERVER name foreign_server_version alter_generic_options | ALTER SERVER name foreign_server_version | ALTER SERVER name alter_generic_options
CreateForeignTableStmt ::= CREATE FOREIGN TABLE qualified_name '(' OptTableElementList ')' OptInherit SERVER name create_generic_options | CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name '(' OptTableElementList ')' OptInherit SERVER name create_generic_options | CREATE FOREIGN TABLE qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec SERVER name create_generic_options | CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec SERVER name create_generic_options
AlterForeignTableStmt ::= ALTER FOREIGN TABLE relation_expr alter_table_cmds | ALTER FOREIGN TABLE IF_P EXISTS relation_expr alter_table_cmds
ImportForeignSchemaStmt ::= IMPORT_P FOREIGN SCHEMA name import_qualification FROM SERVER name INTO name create_generic_options
import_qualification_type ::= LIMIT TO | EXCEPT
import_qualification ::= import_qualification_type '(' relation_expr_list ')' |
CreateUserMappingStmt ::= CREATE USER MAPPING FOR auth_ident SERVER name create_generic_options | CREATE USER MAPPING IF_P NOT EXISTS FOR auth_ident SERVER name create_generic_options
auth_ident ::= RoleSpec | USER
DropUserMappingStmt ::= DROP USER MAPPING FOR auth_ident SERVER name | DROP USER MAPPING IF_P EXISTS FOR auth_ident SERVER name
AlterUserMappingStmt ::= ALTER USER MAPPING FOR auth_ident SERVER name alter_generic_options
CreatePolicyStmt ::= CREATE POLICY name ON qualified_name RowSecurityDefaultPermissive RowSecurityDefaultForCmd RowSecurityDefaultToRole RowSecurityOptionalExpr RowSecurityOptionalWithCheck
AlterPolicyStmt ::= ALTER POLICY name ON qualified_name RowSecurityOptionalToRole RowSecurityOptionalExpr RowSecurityOptionalWithCheck
RowSecurityOptionalExpr ::= USING '(' a_expr ')' |
RowSecurityOptionalWithCheck ::= WITH CHECK '(' a_expr ')' |
RowSecurityDefaultToRole ::= TO role_list |
RowSecurityOptionalToRole ::= TO role_list |
RowSecurityDefaultPermissive ::= AS IDENT |
RowSecurityDefaultForCmd ::= FOR row_security_cmd |
row_security_cmd ::= ALL | SELECT | INSERT | UPDATE | DELETE_P
CreateAmStmt ::= CREATE ACCESS METHOD name TYPE_P am_type HANDLER handler_name
am_type ::= INDEX | TABLE
CreateTrigStmt ::= CREATE TRIGGER name TriggerActionTime TriggerEvents ON qualified_name TriggerReferencing TriggerForSpec TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')' | CREATE CONSTRAINT TRIGGER name AFTER TriggerEvents ON qualified_name OptConstrFromTable ConstraintAttributeSpec FOR EACH ROW TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')'
TriggerActionTime ::= BEFORE | AFTER | INSTEAD OF
TriggerEvents ::= TriggerOneEvent | TriggerEvents OR TriggerOneEvent
TriggerOneEvent ::= INSERT | DELETE_P | UPDATE | UPDATE OF columnList | TRUNCATE
TriggerReferencing ::= REFERENCING TriggerTransitions |
TriggerTransitions ::= TriggerTransition | TriggerTransitions TriggerTransition
TriggerTransition ::= TransitionOldOrNew TransitionRowOrTable opt_as TransitionRelName
TransitionOldOrNew ::= NEW | OLD
TransitionRowOrTable ::= TABLE | ROW
TransitionRelName ::= ColId
TriggerForSpec ::= FOR TriggerForOptEach TriggerForType |
TriggerForOptEach ::= EACH |
TriggerForType ::= ROW | STATEMENT
TriggerWhen ::= WHEN '(' a_expr ')' |
FUNCTION_or_PROCEDURE ::= FUNCTION | PROCEDURE
TriggerFuncArgs ::= TriggerFuncArg | TriggerFuncArgs ',' TriggerFuncArg |
TriggerFuncArg ::= Iconst | FCONST | Sconst | ColLabel
OptConstrFromTable ::= FROM qualified_name |
ConstraintAttributeSpec ::= | ConstraintAttributeSpec ConstraintAttributeElem
ConstraintAttributeElem ::= NOT DEFERRABLE | DEFERRABLE | INITIALLY IMMEDIATE | INITIALLY DEFERRED | NOT VALID | NO INHERIT
CreateEventTrigStmt ::= CREATE EVENT TRIGGER name ON ColLabel EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')' | CREATE EVENT TRIGGER name ON ColLabel WHEN event_trigger_when_list EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')'
event_trigger_when_list ::= event_trigger_when_item | event_trigger_when_list AND event_trigger_when_item
event_trigger_when_item ::= ColId IN_P '(' event_trigger_value_list ')'
event_trigger_value_list ::= SCONST | event_trigger_value_list ',' SCONST
AlterEventTrigStmt ::= ALTER EVENT TRIGGER name enable_trigger
enable_trigger ::= ENABLE_P | ENABLE_P REPLICA | ENABLE_P ALWAYS | DISABLE_P
CreateAssertionStmt ::= CREATE ASSERTION any_name CHECK '(' a_expr ')' ConstraintAttributeSpec
DefineStmt ::= CREATE opt_or_replace AGGREGATE func_name aggr_args definition | CREATE opt_or_replace AGGREGATE func_name old_aggr_definition | CREATE OPERATOR any_operator definition | CREATE TYPE_P any_name definition | CREATE TYPE_P any_name | CREATE TYPE_P any_name AS '(' OptTableFuncElementList ')' | CREATE TYPE_P any_name AS ENUM_P '(' opt_enum_val_list ')' | CREATE TYPE_P any_name AS RANGE definition | CREATE TEXT_P SEARCH PARSER any_name definition | CREATE TEXT_P SEARCH DICTIONARY any_name definition | CREATE TEXT_P SEARCH TEMPLATE any_name definition | CREATE TEXT_P SEARCH CONFIGURATION any_name definition | CREATE COLLATION any_name definition | CREATE COLLATION IF_P NOT EXISTS any_name definition | CREATE COLLATION any_name FROM any_name | CREATE COLLATION IF_P NOT EXISTS any_name FROM any_name
definition ::= '(' def_list ')'
def_list ::= def_elem | def_list ',' def_elem
def_elem ::= ColLabel '=' def_arg | ColLabel
def_arg ::= func_type | reserved_keyword | qual_all_Op | NumericOnly | Sconst | NONE
old_aggr_definition ::= '(' old_aggr_list ')'
old_aggr_list ::= old_aggr_elem | old_aggr_list ',' old_aggr_elem
old_aggr_elem ::= IDENT '=' def_arg
opt_enum_val_list ::= enum_val_list |
enum_val_list ::= Sconst | enum_val_list ',' Sconst
AlterEnumStmt ::= ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists Sconst | ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists Sconst BEFORE Sconst | ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists Sconst AFTER Sconst | ALTER TYPE_P any_name RENAME VALUE_P Sconst TO Sconst
opt_if_not_exists ::= IF_P NOT EXISTS |
CreateOpClassStmt ::= CREATE OPERATOR CLASS any_name opt_default FOR TYPE_P Typename USING access_method opt_opfamily AS opclass_item_list
opclass_item_list ::= opclass_item | opclass_item_list ',' opclass_item
opclass_item ::= OPERATOR Iconst any_operator opclass_purpose opt_recheck | OPERATOR Iconst operator_with_argtypes opclass_purpose opt_recheck | FUNCTION Iconst function_with_argtypes | FUNCTION Iconst '(' type_list ')' function_with_argtypes | STORAGE Typename
opt_default ::= DEFAULT |
opt_opfamily ::= FAMILY any_name |
opclass_purpose ::= FOR SEARCH | FOR ORDER BY any_name |
opt_recheck ::= RECHECK |
CreateOpFamilyStmt ::= CREATE OPERATOR FAMILY any_name USING access_method
AlterOpFamilyStmt ::= ALTER OPERATOR FAMILY any_name USING access_method ADD_P opclass_item_list | ALTER OPERATOR FAMILY any_name USING access_method DROP opclass_drop_list
opclass_drop_list ::= opclass_drop | opclass_drop_list ',' opclass_drop
opclass_drop ::= OPERATOR Iconst '(' type_list ')' | FUNCTION Iconst '(' type_list ')'
DropOpClassStmt ::= DROP OPERATOR CLASS any_name USING access_method opt_drop_behavior | DROP OPERATOR CLASS IF_P EXISTS any_name USING access_method opt_drop_behavior
DropOpFamilyStmt ::= DROP OPERATOR FAMILY any_name USING access_method opt_drop_behavior | DROP OPERATOR FAMILY IF_P EXISTS any_name USING access_method opt_drop_behavior
DropOwnedStmt ::= DROP OWNED BY role_list opt_drop_behavior
ReassignOwnedStmt ::= REASSIGN OWNED BY role_list TO RoleSpec
DropStmt ::= DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior | DROP drop_type_any_name any_name_list opt_drop_behavior | DROP drop_type_name IF_P EXISTS name_list opt_drop_behavior | DROP drop_type_name name_list opt_drop_behavior | DROP drop_type_name_on_any_name name ON any_name opt_drop_behavior | DROP drop_type_name_on_any_name IF_P EXISTS name ON any_name opt_drop_behavior | DROP TYPE_P type_name_list opt_drop_behavior | DROP TYPE_P IF_P EXISTS type_name_list opt_drop_behavior | DROP DOMAIN_P type_name_list opt_drop_behavior | DROP DOMAIN_P IF_P EXISTS type_name_list opt_drop_behavior | DROP INDEX CONCURRENTLY any_name_list opt_drop_behavior | DROP INDEX CONCURRENTLY IF_P EXISTS any_name_list opt_drop_behavior
drop_type_any_name ::= TABLE | SEQUENCE | VIEW | MATERIALIZED VIEW | INDEX | FOREIGN TABLE | COLLATION | CONVERSION_P | STATISTICS | TEXT_P SEARCH PARSER | TEXT_P SEARCH DICTIONARY | TEXT_P SEARCH TEMPLATE | TEXT_P SEARCH CONFIGURATION
drop_type_name ::= ACCESS METHOD | EVENT TRIGGER | EXTENSION | FOREIGN DATA_P WRAPPER | PUBLICATION | SCHEMA | SERVER
drop_type_name_on_any_name ::= POLICY | RULE | TRIGGER
any_name_list ::= any_name | any_name_list ',' any_name
any_name ::= ColId | ColId attrs
attrs ::= '.' attr_name | attrs '.' attr_name
type_name_list ::= Typename | type_name_list ',' Typename
TruncateStmt ::= TRUNCATE opt_table relation_expr_list opt_restart_seqs opt_drop_behavior
opt_restart_seqs ::= CONTINUE_P IDENTITY_P | RESTART IDENTITY_P |
CommentStmt ::= COMMENT ON comment_type_any_name any_name IS comment_text | COMMENT ON comment_type_name name IS comment_text | COMMENT ON TYPE_P Typename IS comment_text | COMMENT ON DOMAIN_P Typename IS comment_text | COMMENT ON AGGREGATE aggregate_with_argtypes IS comment_text | COMMENT ON FUNCTION function_with_argtypes IS comment_text | COMMENT ON OPERATOR operator_with_argtypes IS comment_text | COMMENT ON CONSTRAINT name ON any_name IS comment_text | COMMENT ON CONSTRAINT name ON DOMAIN_P any_name IS comment_text | COMMENT ON POLICY name ON any_name IS comment_text | COMMENT ON PROCEDURE function_with_argtypes IS comment_text | COMMENT ON ROUTINE function_with_argtypes IS comment_text | COMMENT ON RULE name ON any_name IS comment_text | COMMENT ON TRANSFORM FOR Typename LANGUAGE name IS comment_text | COMMENT ON TRIGGER name ON any_name IS comment_text | COMMENT ON OPERATOR CLASS any_name USING access_method IS comment_text | COMMENT ON OPERATOR FAMILY any_name USING access_method IS comment_text | COMMENT ON LARGE_P OBJECT_P NumericOnly IS comment_text | COMMENT ON CAST '(' Typename AS Typename ')' IS comment_text
comment_type_any_name ::= COLUMN | INDEX | SEQUENCE | STATISTICS | TABLE | VIEW | MATERIALIZED VIEW | COLLATION | CONVERSION_P | FOREIGN TABLE | TEXT_P SEARCH CONFIGURATION | TEXT_P SEARCH DICTIONARY | TEXT_P SEARCH PARSER | TEXT_P SEARCH TEMPLATE
comment_type_name ::= ACCESS METHOD | DATABASE | EVENT TRIGGER | EXTENSION | FOREIGN DATA_P WRAPPER | opt_procedural LANGUAGE | PUBLICATION | ROLE | SCHEMA | SERVER | SUBSCRIPTION | TABLESPACE
comment_text ::= Sconst | NULL_P
SecLabelStmt ::= SECURITY LABEL opt_provider ON security_label_type_any_name any_name IS security_label | SECURITY LABEL opt_provider ON security_label_type_name name IS security_label | SECURITY LABEL opt_provider ON TYPE_P Typename IS security_label | SECURITY LABEL opt_provider ON DOMAIN_P Typename IS security_label | SECURITY LABEL opt_provider ON AGGREGATE aggregate_with_argtypes IS security_label | SECURITY LABEL opt_provider ON FUNCTION function_with_argtypes IS security_label | SECURITY LABEL opt_provider ON LARGE_P OBJECT_P NumericOnly IS security_label | SECURITY LABEL opt_provider ON PROCEDURE function_with_argtypes IS security_label | SECURITY LABEL opt_provider ON ROUTINE function_with_argtypes IS security_label
opt_provider ::= FOR NonReservedWord_or_Sconst |
security_label_type_any_name ::= COLUMN | FOREIGN TABLE | SEQUENCE | TABLE | VIEW | MATERIALIZED VIEW
security_label_type_name ::= DATABASE | EVENT TRIGGER | opt_procedural LANGUAGE | PUBLICATION | ROLE | SCHEMA | SUBSCRIPTION | TABLESPACE
security_label ::= Sconst | NULL_P
FetchStmt ::= FETCH fetch_args | MOVE fetch_args
fetch_args ::= cursor_name | from_in cursor_name | NEXT opt_from_in cursor_name | PRIOR opt_from_in cursor_name | FIRST_P opt_from_in cursor_name | LAST_P opt_from_in cursor_name | ABSOLUTE_P SignedIconst opt_from_in cursor_name | RELATIVE_P SignedIconst opt_from_in cursor_name | SignedIconst opt_from_in cursor_name | ALL opt_from_in cursor_name | FORWARD opt_from_in cursor_name | FORWARD SignedIconst opt_from_in cursor_name | FORWARD ALL opt_from_in cursor_name | BACKWARD opt_from_in cursor_name | BACKWARD SignedIconst opt_from_in cursor_name | BACKWARD ALL opt_from_in cursor_name
from_in ::= FROM | IN_P
opt_from_in ::= from_in |
GrantStmt ::= GRANT privileges ON privilege_target TO grantee_list opt_grant_grant_option
RevokeStmt ::= REVOKE privileges ON privilege_target FROM grantee_list opt_drop_behavior | REVOKE GRANT OPTION FOR privileges ON privilege_target FROM grantee_list opt_drop_behavior
privileges ::= privilege_list | ALL | ALL PRIVILEGES | ALL '(' columnList ')' | ALL PRIVILEGES '(' columnList ')'
privilege_list ::= privilege | privilege_list ',' privilege
privilege ::= SELECT opt_column_list | REFERENCES opt_column_list | CREATE opt_column_list | ColId opt_column_list
privilege_target ::= qualified_name_list | TABLE qualified_name_list | SEQUENCE qualified_name_list | FOREIGN DATA_P WRAPPER name_list | FOREIGN SERVER name_list | FUNCTION function_with_argtypes_list | PROCEDURE function_with_argtypes_list | ROUTINE function_with_argtypes_list | DATABASE name_list | DOMAIN_P any_name_list | LANGUAGE name_list | LARGE_P OBJECT_P NumericOnly_list | SCHEMA name_list | TABLESPACE name_list | TYPE_P any_name_list | ALL TABLES IN_P SCHEMA name_list | ALL SEQUENCES IN_P SCHEMA name_list | ALL FUNCTIONS IN_P SCHEMA name_list | ALL PROCEDURES IN_P SCHEMA name_list | ALL ROUTINES IN_P SCHEMA name_list
grantee_list ::= grantee | grantee_list ',' grantee
grantee ::= RoleSpec | GROUP_P RoleSpec
opt_grant_grant_option ::= WITH GRANT OPTION |
GrantRoleStmt ::= GRANT privilege_list TO role_list opt_grant_admin_option opt_granted_by
RevokeRoleStmt ::= REVOKE privilege_list FROM role_list opt_granted_by opt_drop_behavior | REVOKE ADMIN OPTION FOR privilege_list FROM role_list opt_granted_by opt_drop_behavior
opt_grant_admin_option ::= WITH ADMIN OPTION |
opt_granted_by ::= GRANTED BY RoleSpec |
AlterDefaultPrivilegesStmt ::= ALTER DEFAULT PRIVILEGES DefACLOptionList DefACLAction
DefACLOptionList ::= DefACLOptionList DefACLOption |
DefACLOption ::= IN_P SCHEMA name_list | FOR ROLE role_list | FOR USER role_list
DefACLAction ::= GRANT privileges ON defacl_privilege_target TO grantee_list opt_grant_grant_option | REVOKE privileges ON defacl_privilege_target FROM grantee_list opt_drop_behavior | REVOKE GRANT OPTION FOR privileges ON defacl_privilege_target FROM grantee_list opt_drop_behavior
defacl_privilege_target ::= TABLES | FUNCTIONS | ROUTINES | SEQUENCES | TYPES_P | SCHEMAS
IndexStmt ::= CREATE opt_unique INDEX opt_concurrently opt_index_name ON relation_expr access_method_clause '(' index_params ')' opt_include opt_reloptions OptTableSpace where_clause | CREATE opt_unique INDEX opt_concurrently IF_P NOT EXISTS index_name ON relation_expr access_method_clause '(' index_params ')' opt_include opt_reloptions OptTableSpace where_clause
opt_unique ::= UNIQUE |
opt_concurrently ::= CONCURRENTLY |
opt_index_name ::= index_name |
access_method_clause ::= USING access_method |
index_params ::= index_elem | index_params ',' index_elem
index_elem_options ::= opt_collate opt_class opt_asc_desc opt_nulls_order | opt_collate any_name reloptions opt_asc_desc opt_nulls_order
index_elem ::= ColId index_elem_options | func_expr_windowless index_elem_options | '(' a_expr ')' index_elem_options
opt_include ::= INCLUDE '(' index_including_params ')' |
index_including_params ::= index_elem | index_including_params ',' index_elem
opt_collate ::= COLLATE any_name |
opt_class ::= any_name |
opt_asc_desc ::= ASC | DESC |
opt_nulls_order ::= NULLS_LA FIRST_P | NULLS_LA LAST_P |
CreateFunctionStmt ::= CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS func_return createfunc_opt_list | CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS TABLE '(' table_func_column_list ')' createfunc_opt_list | CREATE opt_or_replace FUNCTION func_name func_args_with_defaults createfunc_opt_list | CREATE opt_or_replace PROCEDURE func_name func_args_with_defaults createfunc_opt_list
opt_or_replace ::= OR REPLACE |
func_args ::= '(' func_args_list ')' | '(' ')'
func_args_list ::= func_arg | func_args_list ',' func_arg
function_with_argtypes_list ::= function_with_argtypes | function_with_argtypes_list ',' function_with_argtypes
function_with_argtypes ::= func_name func_args | type_func_name_keyword | ColId | ColId indirection
func_args_with_defaults ::= '(' func_args_with_defaults_list ')' | '(' ')'
func_args_with_defaults_list ::= func_arg_with_default | func_args_with_defaults_list ',' func_arg_with_default
func_arg ::= arg_class param_name func_type | param_name arg_class func_type | param_name func_type | arg_class func_type | func_type
arg_class ::= IN_P | OUT_P | INOUT | IN_P OUT_P | VARIADIC
param_name ::= type_function_name
func_return ::= func_type
func_type ::= Typename | type_function_name attrs '%' TYPE_P | SETOF type_function_name attrs '%' TYPE_P
func_arg_with_default ::= func_arg | func_arg DEFAULT a_expr | func_arg '=' a_expr
aggr_arg ::= func_arg
aggr_args ::= '(' '*' ')' | '(' aggr_args_list ')' | '(' ORDER BY aggr_args_list ')' | '(' aggr_args_list ORDER BY aggr_args_list ')'
aggr_args_list ::= aggr_arg | aggr_args_list ',' aggr_arg
aggregate_with_argtypes ::= func_name aggr_args
aggregate_with_argtypes_list ::= aggregate_with_argtypes | aggregate_with_argtypes_list ',' aggregate_with_argtypes
createfunc_opt_list ::= createfunc_opt_item | createfunc_opt_list createfunc_opt_item
common_func_opt_item ::= CALLED ON NULL_P INPUT_P | RETURNS NULL_P ON NULL_P INPUT_P | STRICT_P | IMMUTABLE | STABLE | VOLATILE | EXTERNAL SECURITY DEFINER | EXTERNAL SECURITY INVOKER | SECURITY DEFINER | SECURITY INVOKER | LEAKPROOF | NOT LEAKPROOF | COST NumericOnly | ROWS NumericOnly | SUPPORT any_name | FunctionSetResetClause | PARALLEL ColId
createfunc_opt_item ::= AS func_as | LANGUAGE NonReservedWord_or_Sconst | TRANSFORM transform_type_list | WINDOW | common_func_opt_item
func_as ::= Sconst | Sconst ',' Sconst
transform_type_list ::= FOR TYPE_P Typename | transform_type_list ',' FOR TYPE_P Typename
opt_definition ::= WITH definition |
table_func_column ::= param_name func_type
table_func_column_list ::= table_func_column | table_func_column_list ',' table_func_column
AlterFunctionStmt ::= ALTER FUNCTION function_with_argtypes alterfunc_opt_list opt_restrict | ALTER PROCEDURE function_with_argtypes alterfunc_opt_list opt_restrict | ALTER ROUTINE function_with_argtypes alterfunc_opt_list opt_restrict
alterfunc_opt_list ::= common_func_opt_item | alterfunc_opt_list common_func_opt_item
opt_restrict ::= RESTRICT | /*empty*/
RemoveFuncStmt ::= DROP FUNCTION function_with_argtypes_list opt_drop_behavior | DROP FUNCTION IF_P EXISTS function_with_argtypes_list opt_drop_behavior | DROP PROCEDURE function_with_argtypes_list opt_drop_behavior | DROP PROCEDURE IF_P EXISTS function_with_argtypes_list opt_drop_behavior | DROP ROUTINE function_with_argtypes_list opt_drop_behavior | DROP ROUTINE IF_P EXISTS function_with_argtypes_list opt_drop_behavior
RemoveAggrStmt ::= DROP AGGREGATE aggregate_with_argtypes_list opt_drop_behavior | DROP AGGREGATE IF_P EXISTS aggregate_with_argtypes_list opt_drop_behavior
RemoveOperStmt ::= DROP OPERATOR operator_with_argtypes_list opt_drop_behavior | DROP OPERATOR IF_P EXISTS operator_with_argtypes_list opt_drop_behavior
oper_argtypes ::= '(' Typename ')' | '(' Typename ',' Typename ')' | '(' NONE ',' Typename ')' | '(' Typename ',' NONE ')'
any_operator ::= all_Op | ColId '.' any_operator
operator_with_argtypes_list ::= operator_with_argtypes | operator_with_argtypes_list ',' operator_with_argtypes
operator_with_argtypes ::= any_operator oper_argtypes
DoStmt ::= DO dostmt_opt_list
dostmt_opt_list ::= dostmt_opt_item | dostmt_opt_list dostmt_opt_item
dostmt_opt_item ::= Sconst | LANGUAGE NonReservedWord_or_Sconst
CreateCastStmt ::= CREATE CAST '(' Typename AS Typename ')' WITH FUNCTION function_with_argtypes cast_context | CREATE CAST '(' Typename AS Typename ')' WITHOUT FUNCTION cast_context | CREATE CAST '(' Typename AS Typename ')' WITH INOUT cast_context
cast_context ::= AS IMPLICIT_P | AS ASSIGNMENT |
DropCastStmt ::= DROP CAST opt_if_exists '(' Typename AS Typename ')' opt_drop_behavior
opt_if_exists ::= IF_P EXISTS |
CreateTransformStmt ::= CREATE opt_or_replace TRANSFORM FOR Typename LANGUAGE name '(' transform_element_list ')'
transform_element_list ::= FROM SQL_P WITH FUNCTION function_with_argtypes ',' TO SQL_P WITH FUNCTION function_with_argtypes | TO SQL_P WITH FUNCTION function_with_argtypes ',' FROM SQL_P WITH FUNCTION function_with_argtypes | FROM SQL_P WITH FUNCTION function_with_argtypes | TO SQL_P WITH FUNCTION function_with_argtypes
DropTransformStmt ::= DROP TRANSFORM opt_if_exists FOR Typename LANGUAGE name opt_drop_behavior
ReindexStmt ::= REINDEX reindex_target_type opt_concurrently qualified_name | REINDEX reindex_target_multitable opt_concurrently name | REINDEX '(' reindex_option_list ')' reindex_target_type opt_concurrently qualified_name | REINDEX '(' reindex_option_list ')' reindex_target_multitable opt_concurrently name
reindex_target_type ::= INDEX | TABLE
reindex_target_multitable ::= SCHEMA | SYSTEM_P | DATABASE
reindex_option_list ::= reindex_option_elem | reindex_option_list ',' reindex_option_elem
reindex_option_elem ::= VERBOSE
AlterTblSpcStmt ::= ALTER TABLESPACE name SET reloptions | ALTER TABLESPACE name RESET reloptions
RenameStmt ::= ALTER AGGREGATE aggregate_with_argtypes RENAME TO name | ALTER COLLATION any_name RENAME TO name | ALTER CONVERSION_P any_name RENAME TO name | ALTER DATABASE database_name RENAME TO database_name | ALTER DOMAIN_P any_name RENAME TO name | ALTER DOMAIN_P any_name RENAME CONSTRAINT name TO name | ALTER FOREIGN DATA_P WRAPPER name RENAME TO name | ALTER FUNCTION function_with_argtypes RENAME TO name | ALTER GROUP_P RoleId RENAME TO RoleId | ALTER opt_procedural LANGUAGE name RENAME TO name | ALTER OPERATOR CLASS any_name USING access_method RENAME TO name | ALTER OPERATOR FAMILY any_name USING access_method RENAME TO name | ALTER POLICY name ON qualified_name RENAME TO name | ALTER POLICY IF_P EXISTS name ON qualified_name RENAME TO name | ALTER PROCEDURE function_with_argtypes RENAME TO name | ALTER PUBLICATION name RENAME TO name | ALTER ROUTINE function_with_argtypes RENAME TO name | ALTER SCHEMA name RENAME TO name | ALTER SERVER name RENAME TO name | ALTER SUBSCRIPTION name RENAME TO name | ALTER TABLE relation_expr RENAME TO name | ALTER TABLE IF_P EXISTS relation_expr RENAME TO name | ALTER SEQUENCE qualified_name RENAME TO name | ALTER SEQUENCE IF_P EXISTS qualified_name RENAME TO name | ALTER VIEW qualified_name RENAME TO name | ALTER VIEW IF_P EXISTS qualified_name RENAME TO name | ALTER MATERIALIZED VIEW qualified_name RENAME TO name | ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name RENAME TO name | ALTER INDEX qualified_name RENAME TO name | ALTER INDEX IF_P EXISTS qualified_name RENAME TO name | ALTER FOREIGN TABLE relation_expr RENAME TO name | ALTER FOREIGN TABLE IF_P EXISTS relation_expr RENAME TO name | ALTER TABLE relation_expr RENAME opt_column name TO name | ALTER TABLE IF_P EXISTS relation_expr RENAME opt_column name TO name | ALTER VIEW qualified_name RENAME opt_column name TO name | ALTER VIEW IF_P EXISTS qualified_name RENAME opt_column name TO name | ALTER MATERIALIZED VIEW qualified_name RENAME opt_column name TO name | ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name RENAME opt_column name TO name | ALTER TABLE relation_expr RENAME CONSTRAINT name TO name | ALTER TABLE IF_P EXISTS relation_expr RENAME CONSTRAINT name TO name | ALTER FOREIGN TABLE relation_expr RENAME opt_column name TO name | ALTER FOREIGN TABLE IF_P EXISTS relation_expr RENAME opt_column name TO name | ALTER RULE name ON qualified_name RENAME TO name | ALTER TRIGGER name ON qualified_name RENAME TO name | ALTER EVENT TRIGGER name RENAME TO name | ALTER ROLE RoleId RENAME TO RoleId | ALTER USER RoleId RENAME TO RoleId | ALTER TABLESPACE name RENAME TO name | ALTER STATISTICS any_name RENAME TO name | ALTER TEXT_P SEARCH PARSER any_name RENAME TO name | ALTER TEXT_P SEARCH DICTIONARY any_name RENAME TO name | ALTER TEXT_P SEARCH TEMPLATE any_name RENAME TO name | ALTER TEXT_P SEARCH CONFIGURATION any_name RENAME TO name | ALTER TYPE_P any_name RENAME TO name | ALTER TYPE_P any_name RENAME ATTRIBUTE name TO name opt_drop_behavior
opt_column ::= COLUMN |
opt_set_data ::= SET DATA_P |
AlterObjectDependsStmt ::= ALTER FUNCTION function_with_argtypes opt_no DEPENDS ON EXTENSION name | ALTER PROCEDURE function_with_argtypes opt_no DEPENDS ON EXTENSION name | ALTER ROUTINE function_with_argtypes opt_no DEPENDS ON EXTENSION name | ALTER TRIGGER name ON qualified_name opt_no DEPENDS ON EXTENSION name | ALTER MATERIALIZED VIEW qualified_name opt_no DEPENDS ON EXTENSION name | ALTER INDEX qualified_name opt_no DEPENDS ON EXTENSION name
opt_no ::= NO |
AlterObjectSchemaStmt ::= ALTER AGGREGATE aggregate_with_argtypes SET SCHEMA name | ALTER COLLATION any_name SET SCHEMA name | ALTER CONVERSION_P any_name SET SCHEMA name | ALTER DOMAIN_P any_name SET SCHEMA name | ALTER EXTENSION name SET SCHEMA name | ALTER FUNCTION function_with_argtypes SET SCHEMA name | ALTER OPERATOR operator_with_argtypes SET SCHEMA name | ALTER OPERATOR CLASS any_name USING access_method SET SCHEMA name | ALTER OPERATOR FAMILY any_name USING access_method SET SCHEMA name | ALTER PROCEDURE function_with_argtypes SET SCHEMA name | ALTER ROUTINE function_with_argtypes SET SCHEMA name | ALTER TABLE relation_expr SET SCHEMA name | ALTER TABLE IF_P EXISTS relation_expr SET SCHEMA name | ALTER STATISTICS any_name SET SCHEMA name | ALTER TEXT_P SEARCH PARSER any_name SET SCHEMA name | ALTER TEXT_P SEARCH DICTIONARY any_name SET SCHEMA name | ALTER TEXT_P SEARCH TEMPLATE any_name SET SCHEMA name | ALTER TEXT_P SEARCH CONFIGURATION any_name SET SCHEMA name | ALTER SEQUENCE qualified_name SET SCHEMA name | ALTER SEQUENCE IF_P EXISTS qualified_name SET SCHEMA name | ALTER VIEW qualified_name SET SCHEMA name | ALTER VIEW IF_P EXISTS qualified_name SET SCHEMA name | ALTER MATERIALIZED VIEW qualified_name SET SCHEMA name | ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name SET SCHEMA name | ALTER FOREIGN TABLE relation_expr SET SCHEMA name | ALTER FOREIGN TABLE IF_P EXISTS relation_expr SET SCHEMA name | ALTER TYPE_P any_name SET SCHEMA name
AlterOperatorStmt ::= ALTER OPERATOR operator_with_argtypes SET '(' operator_def_list ')'
operator_def_list ::= operator_def_elem | operator_def_list ',' operator_def_elem
operator_def_elem ::= ColLabel '=' NONE | ColLabel '=' operator_def_arg
operator_def_arg ::= func_type | reserved_keyword | qual_all_Op | NumericOnly | Sconst
AlterTypeStmt ::= ALTER TYPE_P any_name SET '(' operator_def_list ')'
AlterOwnerStmt ::= ALTER AGGREGATE aggregate_with_argtypes OWNER TO RoleSpec | ALTER COLLATION any_name OWNER TO RoleSpec | ALTER CONVERSION_P any_name OWNER TO RoleSpec | ALTER DATABASE database_name OWNER TO RoleSpec | ALTER DOMAIN_P any_name OWNER TO RoleSpec | ALTER FUNCTION function_with_argtypes OWNER TO RoleSpec | ALTER opt_procedural LANGUAGE name OWNER TO RoleSpec | ALTER LARGE_P OBJECT_P NumericOnly OWNER TO RoleSpec | ALTER OPERATOR operator_with_argtypes OWNER TO RoleSpec | ALTER OPERATOR CLASS any_name USING access_method OWNER TO RoleSpec | ALTER OPERATOR FAMILY any_name USING access_method OWNER TO RoleSpec | ALTER PROCEDURE function_with_argtypes OWNER TO RoleSpec | ALTER ROUTINE function_with_argtypes OWNER TO RoleSpec | ALTER SCHEMA name OWNER TO RoleSpec | ALTER TYPE_P any_name OWNER TO RoleSpec | ALTER TABLESPACE name OWNER TO RoleSpec | ALTER STATISTICS any_name OWNER TO RoleSpec | ALTER TEXT_P SEARCH DICTIONARY any_name OWNER TO RoleSpec | ALTER TEXT_P SEARCH CONFIGURATION any_name OWNER TO RoleSpec | ALTER FOREIGN DATA_P WRAPPER name OWNER TO RoleSpec | ALTER SERVER name OWNER TO RoleSpec | ALTER EVENT TRIGGER name OWNER TO RoleSpec | ALTER PUBLICATION name OWNER TO RoleSpec | ALTER SUBSCRIPTION name OWNER TO RoleSpec
CreatePublicationStmt ::= CREATE PUBLICATION name opt_publication_for_tables opt_definition
opt_publication_for_tables ::= publication_for_tables |
publication_for_tables ::= FOR TABLE relation_expr_list | FOR ALL TABLES
AlterPublicationStmt ::= ALTER PUBLICATION name SET definition | ALTER PUBLICATION name ADD_P TABLE relation_expr_list | ALTER PUBLICATION name SET TABLE relation_expr_list | ALTER PUBLICATION name DROP TABLE relation_expr_list
CreateSubscriptionStmt ::= CREATE SUBSCRIPTION name CONNECTION Sconst PUBLICATION publication_name_list opt_definition
publication_name_list ::= publication_name_item | publication_name_list ',' publication_name_item
publication_name_item ::= ColLabel
AlterSubscriptionStmt ::= ALTER SUBSCRIPTION name SET definition | ALTER SUBSCRIPTION name CONNECTION Sconst | ALTER SUBSCRIPTION name REFRESH PUBLICATION opt_definition | ALTER SUBSCRIPTION name SET PUBLICATION publication_name_list opt_definition | ALTER SUBSCRIPTION name ENABLE_P | ALTER SUBSCRIPTION name DISABLE_P
DropSubscriptionStmt ::= DROP SUBSCRIPTION name opt_drop_behavior | DROP SUBSCRIPTION IF_P EXISTS name opt_drop_behavior
RuleStmt ::= CREATE opt_or_replace RULE name AS ON event TO qualified_name where_clause DO opt_instead RuleActionList
RuleActionList ::= NOTHING | RuleActionStmt | '(' RuleActionMulti ')'
RuleActionMulti ::= RuleActionMulti ';' RuleActionStmtOrEmpty | RuleActionStmtOrEmpty
RuleActionStmt ::= SelectStmt | InsertStmt | UpdateStmt | DeleteStmt | NotifyStmt
RuleActionStmtOrEmpty ::= RuleActionStmt |
event ::= SELECT | UPDATE | DELETE_P | INSERT
opt_instead ::= INSTEAD | ALSO |
NotifyStmt ::= NOTIFY ColId notify_payload
notify_payload ::= ',' Sconst |
ListenStmt ::= LISTEN ColId
UnlistenStmt ::= UNLISTEN ColId | UNLISTEN '*'
TransactionStmt ::= ABORT_P opt_transaction opt_transaction_chain | BEGIN_P opt_transaction transaction_mode_list_or_empty | START TRANSACTION transaction_mode_list_or_empty | COMMIT opt_transaction opt_transaction_chain | END_P opt_transaction opt_transaction_chain | ROLLBACK opt_transaction opt_transaction_chain | SAVEPOINT ColId | RELEASE SAVEPOINT ColId | RELEASE ColId | ROLLBACK opt_transaction TO SAVEPOINT ColId | ROLLBACK opt_transaction TO ColId | PREPARE TRANSACTION Sconst | COMMIT PREPARED Sconst | ROLLBACK PREPARED Sconst
opt_transaction ::= WORK | TRANSACTION |
transaction_mode_item ::= ISOLATION LEVEL iso_level | READ ONLY | READ WRITE | DEFERRABLE | NOT DEFERRABLE
transaction_mode_list ::= transaction_mode_item | transaction_mode_list ',' transaction_mode_item | transaction_mode_list transaction_mode_item
transaction_mode_list_or_empty ::= transaction_mode_list |
opt_transaction_chain ::= AND CHAIN | AND NO CHAIN |
ViewStmt ::= CREATE OptTemp VIEW qualified_name opt_column_list opt_reloptions AS SelectStmt opt_check_option | CREATE OR REPLACE OptTemp VIEW qualified_name opt_column_list opt_reloptions AS SelectStmt opt_check_option | CREATE OptTemp RECURSIVE VIEW qualified_name '(' columnList ')' opt_reloptions AS SelectStmt opt_check_option | CREATE OR REPLACE OptTemp RECURSIVE VIEW qualified_name '(' columnList ')' opt_reloptions AS SelectStmt opt_check_option
opt_check_option ::= WITH CHECK OPTION | WITH CASCADED CHECK OPTION | WITH LOCAL CHECK OPTION |
LoadStmt ::= LOAD file_name
CreatedbStmt ::= CREATE DATABASE database_name opt_with createdb_opt_list
createdb_opt_list ::= createdb_opt_items |
createdb_opt_items ::= createdb_opt_item | createdb_opt_items createdb_opt_item
createdb_opt_item ::= createdb_opt_name opt_equal SignedIconst | createdb_opt_name opt_equal opt_boolean_or_string | createdb_opt_name opt_equal DEFAULT
createdb_opt_name ::= IDENT | CONNECTION LIMIT | ENCODING | LOCATION | OWNER | TABLESPACE | TEMPLATE
opt_equal ::= '=' |
AlterDatabaseStmt ::= ALTER DATABASE database_name WITH createdb_opt_list | ALTER DATABASE database_name createdb_opt_list | ALTER DATABASE database_name SET TABLESPACE name
AlterDatabaseSetStmt ::= ALTER DATABASE database_name SetResetClause
DropdbStmt ::= DROP DATABASE database_name | DROP DATABASE IF_P EXISTS database_name | DROP DATABASE database_name opt_with '(' drop_option_list ')' | DROP DATABASE IF_P EXISTS database_name opt_with '(' drop_option_list ')'
drop_option_list ::= drop_option | drop_option_list ',' drop_option
drop_option ::= FORCE
AlterCollationStmt ::= ALTER COLLATION any_name REFRESH VERSION_P
AlterSystemStmt ::= ALTER SYSTEM_P SET generic_set | ALTER SYSTEM_P RESET generic_reset
CreateDomainStmt ::= CREATE DOMAIN_P any_name opt_as Typename ColQualList
AlterDomainStmt ::= ALTER DOMAIN_P any_name alter_column_default | ALTER DOMAIN_P any_name DROP NOT NULL_P | ALTER DOMAIN_P any_name SET NOT NULL_P | ALTER DOMAIN_P any_name ADD_P TableConstraint | ALTER DOMAIN_P any_name DROP CONSTRAINT name opt_drop_behavior | ALTER DOMAIN_P any_name DROP CONSTRAINT IF_P EXISTS name opt_drop_behavior | ALTER DOMAIN_P any_name VALIDATE CONSTRAINT name
opt_as ::= AS |
AlterTSDictionaryStmt ::= ALTER TEXT_P SEARCH DICTIONARY any_name definition
AlterTSConfigurationStmt ::= ALTER TEXT_P SEARCH CONFIGURATION any_name ADD_P MAPPING FOR name_list any_with any_name_list | ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING FOR name_list any_with any_name_list | ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING REPLACE any_name any_with any_name | ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING FOR name_list REPLACE any_name any_with any_name | ALTER TEXT_P SEARCH CONFIGURATION any_name DROP MAPPING FOR name_list | ALTER TEXT_P SEARCH CONFIGURATION any_name DROP MAPPING IF_P EXISTS FOR name_list
any_with ::= WITH | WITH_LA
CreateConversionStmt ::= CREATE opt_default CONVERSION_P any_name FOR Sconst TO Sconst FROM any_name
ClusterStmt ::= CLUSTER opt_verbose qualified_name cluster_index_specification | CLUSTER opt_verbose | CLUSTER opt_verbose index_name ON qualified_name
cluster_index_specification ::= USING index_name |
VacuumStmt ::= VACUUM opt_full opt_freeze opt_verbose opt_analyze opt_vacuum_relation_list | VACUUM '(' vac_analyze_option_list ')' opt_vacuum_relation_list
AnalyzeStmt ::= analyze_keyword opt_verbose opt_vacuum_relation_list | analyze_keyword '(' vac_analyze_option_list ')' opt_vacuum_relation_list
vac_analyze_option_list ::= vac_analyze_option_elem | vac_analyze_option_list ',' vac_analyze_option_elem
analyze_keyword ::= ANALYZE | ANALYSE
vac_analyze_option_elem ::= vac_analyze_option_name vac_analyze_option_arg
vac_analyze_option_name ::= NonReservedWord | analyze_keyword
vac_analyze_option_arg ::= opt_boolean_or_string | NumericOnly |
opt_analyze ::= analyze_keyword |
opt_verbose ::= VERBOSE |
opt_full ::= FULL |
opt_freeze ::= FREEZE |
opt_name_list ::= '(' name_list ')' |
vacuum_relation ::= qualified_name opt_name_list
vacuum_relation_list ::= vacuum_relation | vacuum_relation_list ',' vacuum_relation
opt_vacuum_relation_list ::= vacuum_relation_list |
ExplainStmt ::= EXPLAIN ExplainableStmt | EXPLAIN analyze_keyword opt_verbose ExplainableStmt | EXPLAIN VERBOSE ExplainableStmt | EXPLAIN '(' explain_option_list ')' ExplainableStmt
ExplainableStmt ::= SelectStmt | InsertStmt | UpdateStmt | DeleteStmt | DeclareCursorStmt | CreateAsStmt | CreateMatViewStmt | RefreshMatViewStmt | ExecuteStmt
explain_option_list ::= explain_option_elem | explain_option_list ',' explain_option_elem
explain_option_elem ::= explain_option_name explain_option_arg
explain_option_name ::= NonReservedWord | analyze_keyword
explain_option_arg ::= opt_boolean_or_string | NumericOnly |
PrepareStmt ::= PREPARE name prep_type_clause AS PreparableStmt
prep_type_clause ::= '(' type_list ')' |
PreparableStmt ::= SelectStmt | InsertStmt | UpdateStmt | DeleteStmt
ExecuteStmt ::= EXECUTE name execute_param_clause | CREATE OptTemp TABLE create_as_target AS EXECUTE name execute_param_clause opt_with_data | CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS EXECUTE name execute_param_clause opt_with_data
execute_param_clause ::= '(' expr_list ')' |
DeallocateStmt ::= DEALLOCATE name | DEALLOCATE PREPARE name | DEALLOCATE ALL | DEALLOCATE PREPARE ALL
InsertStmt ::= opt_with_clause INSERT INTO insert_target insert_rest opt_on_conflict returning_clause
insert_target ::= qualified_name | qualified_name AS ColId
insert_rest ::= SelectStmt | OVERRIDING override_kind VALUE_P SelectStmt | '(' insert_column_list ')' SelectStmt | '(' insert_column_list ')' OVERRIDING override_kind VALUE_P SelectStmt | DEFAULT VALUES
override_kind ::= USER | SYSTEM_P
insert_column_list ::= insert_column_item | insert_column_list ',' insert_column_item
insert_column_item ::= ColId opt_indirection
opt_on_conflict ::= ON CONFLICT opt_conf_expr DO UPDATE SET set_clause_list where_clause | ON CONFLICT opt_conf_expr DO NOTHING |
opt_conf_expr ::= '(' index_params ')' where_clause | ON CONSTRAINT name |
returning_clause ::= RETURNING target_list |
DeleteStmt ::= opt_with_clause DELETE_P FROM relation_expr_opt_alias using_clause where_or_current_clause returning_clause
using_clause ::= USING from_list |
LockStmt ::= LOCK_P opt_table relation_expr_list opt_lock opt_nowait
opt_lock ::= IN_P lock_type MODE |
lock_type ::= ACCESS SHARE | ROW SHARE | ROW EXCLUSIVE | SHARE UPDATE EXCLUSIVE | SHARE | SHARE ROW EXCLUSIVE | EXCLUSIVE | ACCESS EXCLUSIVE
opt_nowait ::= NOWAIT |
opt_nowait_or_skip ::= NOWAIT | SKIP LOCKED |
UpdateStmt ::= opt_with_clause UPDATE relation_expr_opt_alias SET set_clause_list from_clause where_or_current_clause returning_clause
set_clause_list ::= set_clause | set_clause_list ',' set_clause
set_clause ::= set_target '=' a_expr | '(' set_target_list ')' '=' a_expr
set_target ::= ColId opt_indirection
set_target_list ::= set_target | set_target_list ',' set_target
DeclareCursorStmt ::= DECLARE cursor_name cursor_options CURSOR opt_hold FOR SelectStmt
cursor_name ::= name
cursor_options ::= | cursor_options NO SCROLL | cursor_options SCROLL | cursor_options BINARY | cursor_options INSENSITIVE
opt_hold ::= | WITH HOLD | WITHOUT HOLD
SelectStmt ::= select_no_parens | select_with_parens
select_with_parens ::= '(' select_no_parens ')' | '(' select_with_parens ')'
select_no_parens ::= simple_select | select_clause sort_clause | select_clause opt_sort_clause for_locking_clause opt_select_limit | select_clause opt_sort_clause select_limit opt_for_locking_clause | with_clause select_clause | with_clause select_clause sort_clause | with_clause select_clause opt_sort_clause for_locking_clause opt_select_limit | with_clause select_clause opt_sort_clause select_limit opt_for_locking_clause
select_clause ::= simple_select | select_with_parens
simple_select ::= SELECT opt_all_clause opt_target_list into_clause from_clause where_clause group_clause having_clause window_clause | SELECT distinct_clause target_list into_clause from_clause where_clause group_clause having_clause window_clause | values_clause | TABLE relation_expr | select_clause UNION all_or_distinct select_clause | select_clause INTERSECT all_or_distinct select_clause | select_clause EXCEPT all_or_distinct select_clause
with_clause ::= WITH cte_list | WITH_LA cte_list | WITH RECURSIVE cte_list
cte_list ::= common_table_expr | cte_list ',' common_table_expr
common_table_expr ::= name opt_name_list AS opt_materialized '(' PreparableStmt ')'
opt_materialized ::= MATERIALIZED | NOT MATERIALIZED |
opt_with_clause ::= with_clause |
into_clause ::= INTO OptTempTableName |
OptTempTableName ::= TEMPORARY opt_table qualified_name | TEMP opt_table qualified_name | LOCAL TEMPORARY opt_table qualified_name | LOCAL TEMP opt_table qualified_name | GLOBAL TEMPORARY opt_table qualified_name | GLOBAL TEMP opt_table qualified_name | UNLOGGED opt_table qualified_name | TABLE qualified_name | qualified_name
opt_table ::= TABLE |
all_or_distinct ::= ALL | DISTINCT |
distinct_clause ::= DISTINCT | DISTINCT ON '(' expr_list ')'
opt_all_clause ::= ALL |
opt_sort_clause ::= sort_clause |
sort_clause ::= ORDER BY sortby_list
sortby_list ::= sortby | sortby_list ',' sortby
sortby ::= a_expr USING qual_all_Op opt_nulls_order | a_expr opt_asc_desc opt_nulls_order
select_limit ::= limit_clause offset_clause | offset_clause limit_clause | limit_clause | offset_clause
opt_select_limit ::= select_limit |
limit_clause ::= LIMIT select_limit_value | LIMIT select_limit_value ',' select_offset_value | FETCH first_or_next select_fetch_first_value row_or_rows ONLY | FETCH first_or_next select_fetch_first_value row_or_rows WITH TIES | FETCH first_or_next row_or_rows ONLY | FETCH first_or_next row_or_rows WITH TIES
offset_clause ::= OFFSET select_offset_value | OFFSET select_fetch_first_value row_or_rows
select_limit_value ::= a_expr | ALL
select_offset_value ::= a_expr
select_fetch_first_value ::= c_expr | '+' I_or_F_const | '-' I_or_F_const
I_or_F_const ::= Iconst | FCONST
row_or_rows ::= ROW | ROWS
first_or_next ::= FIRST_P | NEXT
group_clause ::= GROUP_P BY group_by_list |
group_by_list ::= group_by_item | group_by_list ',' group_by_item
group_by_item ::= a_expr | empty_grouping_set | cube_clause | rollup_clause | grouping_sets_clause
empty_grouping_set ::= '(' ')'
rollup_clause ::= ROLLUP '(' expr_list ')'
cube_clause ::= CUBE '(' expr_list ')'
grouping_sets_clause ::= GROUPING SETS '(' group_by_list ')'
having_clause ::= HAVING a_expr |
for_locking_clause ::= for_locking_items | FOR READ ONLY
opt_for_locking_clause ::= for_locking_clause |
for_locking_items ::= for_locking_item | for_locking_items for_locking_item
for_locking_item ::= for_locking_strength locked_rels_list opt_nowait_or_skip
for_locking_strength ::= FOR UPDATE | FOR NO KEY UPDATE | FOR SHARE | FOR KEY SHARE
locked_rels_list ::= OF qualified_name_list |
values_clause ::= VALUES '(' expr_list ')' | values_clause ',' '(' expr_list ')'
from_clause ::= FROM from_list |
from_list ::= table_ref | from_list ',' table_ref
table_ref ::= relation_expr opt_alias_clause | relation_expr opt_alias_clause tablesample_clause | func_table func_alias_clause | LATERAL_P func_table func_alias_clause | xmltable opt_alias_clause | LATERAL_P xmltable opt_alias_clause | select_with_parens opt_alias_clause | LATERAL_P select_with_parens opt_alias_clause | joined_table | '(' joined_table ')' alias_clause
joined_table ::= '(' joined_table ')' | table_ref CROSS JOIN table_ref | table_ref join_type JOIN table_ref join_qual | table_ref JOIN table_ref join_qual | table_ref NATURAL join_type JOIN table_ref | table_ref NATURAL JOIN table_ref
alias_clause ::= AS ColId '(' name_list ')' | AS ColId | ColId '(' name_list ')' | ColId
opt_alias_clause ::= alias_clause |
func_alias_clause ::= alias_clause | AS '(' TableFuncElementList ')' | AS ColId '(' TableFuncElementList ')' | ColId '(' TableFuncElementList ')' |
join_type ::= FULL join_outer | LEFT join_outer | RIGHT join_outer | INNER_P
join_outer ::= OUTER_P |
join_qual ::= USING '(' name_list ')' | ON a_expr
relation_expr ::= qualified_name | qualified_name '*' | ONLY qualified_name | ONLY '(' qualified_name ')'
relation_expr_list ::= relation_expr | relation_expr_list ',' relation_expr
relation_expr_opt_alias ::= relation_expr | relation_expr ColId | relation_expr AS ColId
tablesample_clause ::= TABLESAMPLE func_name '(' expr_list ')' opt_repeatable_clause
opt_repeatable_clause ::= REPEATABLE '(' a_expr ')' |
func_table ::= func_expr_windowless opt_ordinality | ROWS FROM '(' rowsfrom_list ')' opt_ordinality
rowsfrom_item ::= func_expr_windowless opt_col_def_list
rowsfrom_list ::= rowsfrom_item | rowsfrom_list ',' rowsfrom_item
opt_col_def_list ::= AS '(' TableFuncElementList ')' |
opt_ordinality ::= WITH_LA ORDINALITY |
where_clause ::= WHERE a_expr |
where_or_current_clause ::= WHERE a_expr | WHERE CURRENT_P OF cursor_name |
OptTableFuncElementList ::= TableFuncElementList |
TableFuncElementList ::= TableFuncElement | TableFuncElementList ',' TableFuncElement
TableFuncElement ::= ColId Typename opt_collate_clause
xmltable ::= XMLTABLE '(' c_expr xmlexists_argument COLUMNS xmltable_column_list ')' | XMLTABLE '(' XMLNAMESPACES '(' xml_namespace_list ')' ',' c_expr xmlexists_argument COLUMNS xmltable_column_list ')'
xmltable_column_list ::= xmltable_column_el | xmltable_column_list ',' xmltable_column_el
xmltable_column_el ::= ColId Typename | ColId Typename xmltable_column_option_list | ColId FOR ORDINALITY
xmltable_column_option_list ::= xmltable_column_option_el | xmltable_column_option_list xmltable_column_option_el
xmltable_column_option_el ::= IDENT b_expr | DEFAULT b_expr | NOT NULL_P | NULL_P
xml_namespace_list ::= xml_namespace_el | xml_namespace_list ',' xml_namespace_el
xml_namespace_el ::= b_expr AS ColLabel | DEFAULT b_expr
Typename ::= SimpleTypename opt_array_bounds | SETOF SimpleTypename opt_array_bounds | SimpleTypename ARRAY '[' Iconst ']' | SETOF SimpleTypename ARRAY '[' Iconst ']' | SimpleTypename ARRAY | SETOF SimpleTypename ARRAY
opt_array_bounds ::= opt_array_bounds '[' ']' | opt_array_bounds '[' Iconst ']' |
SimpleTypename ::= GenericType | Numeric | Bit | Character | ConstDatetime | ConstInterval opt_interval | ConstInterval '(' Iconst ')'
ConstTypename ::= Numeric | ConstBit | ConstCharacter | ConstDatetime
GenericType ::= type_function_name opt_type_modifiers | type_function_name attrs opt_type_modifiers
opt_type_modifiers ::= '(' expr_list ')' |
Numeric ::= INT_P | INTEGER | SMALLINT | BIGINT | REAL | FLOAT_P opt_float | DOUBLE_P PRECISION | DECIMAL_P opt_type_modifiers | DEC opt_type_modifiers | NUMERIC opt_type_modifiers | BOOLEAN_P
opt_float ::= '(' Iconst ')' |
Bit ::= BitWithLength | BitWithoutLength
ConstBit ::= BitWithLength | BitWithoutLength
BitWithLength ::= BIT opt_varying '(' expr_list ')'
BitWithoutLength ::= BIT opt_varying
Character ::= CharacterWithLength | CharacterWithoutLength
ConstCharacter ::= CharacterWithLength | CharacterWithoutLength
CharacterWithLength ::= character '(' Iconst ')'
CharacterWithoutLength ::= character
character ::= CHARACTER opt_varying | CHAR_P opt_varying | VARCHAR | NATIONAL CHARACTER opt_varying | NATIONAL CHAR_P opt_varying | NCHAR opt_varying
opt_varying ::= VARYING |
ConstDatetime ::= TIMESTAMP '(' Iconst ')' opt_timezone | TIMESTAMP opt_timezone | TIME '(' Iconst ')' opt_timezone | TIME opt_timezone
ConstInterval ::= INTERVAL
opt_timezone ::= WITH_LA TIME ZONE | WITHOUT TIME ZONE |
opt_interval ::= YEAR_P | MONTH_P | DAY_P | HOUR_P | MINUTE_P | interval_second | YEAR_P TO MONTH_P | DAY_P TO HOUR_P | DAY_P TO MINUTE_P | DAY_P TO interval_second | HOUR_P TO MINUTE_P | HOUR_P TO interval_second | MINUTE_P TO interval_second |
interval_second ::= SECOND_P | SECOND_P '(' Iconst ')'
a_expr ::= c_expr | a_expr TYPECAST Typename | a_expr COLLATE any_name | a_expr AT TIME ZONE a_expr | '+' a_expr | '-' a_expr | a_expr '+' a_expr | a_expr '-' a_expr | a_expr '*' a_expr | a_expr '/' a_expr | a_expr '%' a_expr | a_expr '^' a_expr | a_expr '<' a_expr | a_expr '>' a_expr | a_expr '=' a_expr | a_expr LESS_EQUALS a_expr | a_expr GREATER_EQUALS a_expr | a_expr NOT_EQUALS a_expr | a_expr qual_Op a_expr | qual_Op a_expr | a_expr qual_Op | a_expr AND a_expr | a_expr OR a_expr | NOT a_expr | NOT_LA a_expr | a_expr LIKE a_expr | a_expr LIKE a_expr ESCAPE a_expr | a_expr NOT_LA LIKE a_expr | a_expr NOT_LA LIKE a_expr ESCAPE a_expr | a_expr ILIKE a_expr | a_expr ILIKE a_expr ESCAPE a_expr | a_expr NOT_LA ILIKE a_expr | a_expr NOT_LA ILIKE a_expr ESCAPE a_expr | a_expr SIMILAR TO a_expr | a_expr SIMILAR TO a_expr ESCAPE a_expr | a_expr NOT_LA SIMILAR TO a_expr | a_expr NOT_LA SIMILAR TO a_expr ESCAPE a_expr | a_expr IS NULL_P | a_expr ISNULL | a_expr IS NOT NULL_P | a_expr NOTNULL | row OVERLAPS row | a_expr IS TRUE_P | a_expr IS NOT TRUE_P | a_expr IS FALSE_P | a_expr IS NOT FALSE_P | a_expr IS UNKNOWN | a_expr IS NOT UNKNOWN | a_expr IS DISTINCT FROM a_expr | a_expr IS NOT DISTINCT FROM a_expr | a_expr IS OF '(' type_list ')' | a_expr IS NOT OF '(' type_list ')' | a_expr BETWEEN opt_asymmetric b_expr AND a_expr | a_expr NOT_LA BETWEEN opt_asymmetric b_expr AND a_expr | a_expr BETWEEN SYMMETRIC b_expr AND a_expr | a_expr NOT_LA BETWEEN SYMMETRIC b_expr AND a_expr | a_expr IN_P in_expr | a_expr NOT_LA IN_P in_expr | a_expr subquery_Op sub_type select_with_parens | a_expr subquery_Op sub_type '(' a_expr ')' | UNIQUE select_with_parens | a_expr IS DOCUMENT_P | a_expr IS NOT DOCUMENT_P | a_expr IS NORMALIZED | a_expr IS unicode_normal_form NORMALIZED | a_expr IS NOT NORMALIZED | a_expr IS NOT unicode_normal_form NORMALIZED | DEFAULT
b_expr ::= c_expr | b_expr TYPECAST Typename | '+' b_expr | '-' b_expr | b_expr '+' b_expr | b_expr '-' b_expr | b_expr '*' b_expr | b_expr '/' b_expr | b_expr '%' b_expr | b_expr '^' b_expr | b_expr '<' b_expr | b_expr '>' b_expr | b_expr '=' b_expr | b_expr LESS_EQUALS b_expr | b_expr GREATER_EQUALS b_expr | b_expr NOT_EQUALS b_expr | b_expr qual_Op b_expr | qual_Op b_expr | b_expr qual_Op | b_expr IS DISTINCT FROM b_expr | b_expr IS NOT DISTINCT FROM b_expr | b_expr IS OF '(' type_list ')' | b_expr IS NOT OF '(' type_list ')' | b_expr IS DOCUMENT_P | b_expr IS NOT DOCUMENT_P
c_expr ::= columnref | AexprConst | PARAM opt_indirection | '(' a_expr ')' opt_indirection | case_expr | func_expr | select_with_parens | select_with_parens indirection | EXISTS select_with_parens | ARRAY select_with_parens | ARRAY array_expr | explicit_row | implicit_row | GROUPING '(' expr_list ')'
func_application ::= func_name '(' ')' | func_name '(' func_arg_list opt_sort_clause ')' | func_name '(' VARIADIC func_arg_expr opt_sort_clause ')' | func_name '(' func_arg_list ',' VARIADIC func_arg_expr opt_sort_clause ')' | func_name '(' ALL func_arg_list opt_sort_clause ')' | func_name '(' DISTINCT func_arg_list opt_sort_clause ')' | func_name '(' '*' ')'
func_expr ::= func_application within_group_clause filter_clause over_clause | func_expr_common_subexpr
func_expr_windowless ::= func_application | func_expr_common_subexpr
func_expr_common_subexpr ::= COLLATION FOR '(' a_expr ')' | CURRENT_DATE | CURRENT_TIME | CURRENT_TIME '(' Iconst ')' | CURRENT_TIMESTAMP | CURRENT_TIMESTAMP '(' Iconst ')' | LOCALTIME | LOCALTIME '(' Iconst ')' | LOCALTIMESTAMP | LOCALTIMESTAMP '(' Iconst ')' | CURRENT_ROLE | CURRENT_USER | SESSION_USER | USER | CURRENT_CATALOG | CURRENT_SCHEMA | CAST '(' a_expr AS Typename ')' | EXTRACT '(' extract_list ')' | NORMALIZE '(' a_expr ')' | NORMALIZE '(' a_expr ',' unicode_normal_form ')' | OVERLAY '(' overlay_list ')' | POSITION '(' position_list ')' | SUBSTRING '(' substr_list ')' | TREAT '(' a_expr AS Typename ')' | TRIM '(' BOTH trim_list ')' | TRIM '(' LEADING trim_list ')' | TRIM '(' TRAILING trim_list ')' | TRIM '(' trim_list ')' | NULLIF '(' a_expr ',' a_expr ')' | COALESCE '(' expr_list ')' | GREATEST '(' expr_list ')' | LEAST '(' expr_list ')' | XMLCONCAT '(' expr_list ')' | XMLELEMENT '(' NAME_P ColLabel ')' | XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ')' | XMLELEMENT '(' NAME_P ColLabel ',' expr_list ')' | XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ',' expr_list ')' | XMLEXISTS '(' c_expr xmlexists_argument ')' | XMLFOREST '(' xml_attribute_list ')' | XMLPARSE '(' document_or_content a_expr xml_whitespace_option ')' | XMLPI '(' NAME_P ColLabel ')' | XMLPI '(' NAME_P ColLabel ',' a_expr ')' | XMLROOT '(' a_expr ',' xml_root_version opt_xml_root_standalone ')' | XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename ')'
xml_root_version ::= VERSION_P a_expr | VERSION_P NO VALUE_P
opt_xml_root_standalone ::= ',' STANDALONE_P YES_P | ',' STANDALONE_P NO | ',' STANDALONE_P NO VALUE_P |
xml_attributes ::= XMLATTRIBUTES '(' xml_attribute_list ')'
xml_attribute_list ::= xml_attribute_el | xml_attribute_list ',' xml_attribute_el
xml_attribute_el ::= a_expr AS ColLabel | a_expr
document_or_content ::= DOCUMENT_P | CONTENT_P
xml_whitespace_option ::= PRESERVE WHITESPACE_P | STRIP_P WHITESPACE_P |
xmlexists_argument ::= PASSING c_expr | PASSING c_expr xml_passing_mech | PASSING xml_passing_mech c_expr | PASSING xml_passing_mech c_expr xml_passing_mech
xml_passing_mech ::= BY REF | BY VALUE_P
within_group_clause ::= WITHIN GROUP_P '(' sort_clause ')' |
filter_clause ::= FILTER '(' WHERE a_expr ')' |
window_clause ::= WINDOW window_definition_list |
window_definition_list ::= window_definition | window_definition_list ',' window_definition
window_definition ::= ColId AS window_specification
over_clause ::= OVER window_specification | OVER ColId |
window_specification ::= '(' opt_existing_window_name opt_partition_clause opt_sort_clause opt_frame_clause ')'
opt_existing_window_name ::= ColId |
opt_partition_clause ::= PARTITION BY expr_list |
opt_frame_clause ::= RANGE frame_extent opt_window_exclusion_clause | ROWS frame_extent opt_window_exclusion_clause | GROUPS frame_extent opt_window_exclusion_clause |
frame_extent ::= frame_bound | BETWEEN frame_bound AND frame_bound
frame_bound ::= UNBOUNDED PRECEDING | UNBOUNDED FOLLOWING | CURRENT_P ROW | a_expr PRECEDING | a_expr FOLLOWING
opt_window_exclusion_clause ::= EXCLUDE CURRENT_P ROW | EXCLUDE GROUP_P | EXCLUDE TIES | EXCLUDE NO OTHERS |
row ::= ROW '(' expr_list ')' | ROW '(' ')' | '(' expr_list ',' a_expr ')'
explicit_row ::= ROW '(' expr_list ')' | ROW '(' ')'
implicit_row ::= '(' expr_list ',' a_expr ')'
sub_type ::= ANY | SOME | ALL
all_Op ::= Op | MathOp
MathOp ::= '+' | '-' | '*' | '/' | '%' | '^' | '<' | '>' | '=' | LESS_EQUALS | GREATER_EQUALS | NOT_EQUALS
qual_Op ::= Op | OPERATOR '(' any_operator ')'
qual_all_Op ::= all_Op | OPERATOR '(' any_operator ')'
subquery_Op ::= all_Op | OPERATOR '(' any_operator ')' | LIKE | NOT_LA LIKE | ILIKE | NOT_LA ILIKE
expr_list ::= a_expr | expr_list ',' a_expr
func_arg_list ::= func_arg_expr | func_arg_list ',' func_arg_expr
func_arg_expr ::= a_expr | param_name COLON_EQUALS a_expr | param_name EQUALS_GREATER a_expr
type_list ::= Typename | type_list ',' Typename
array_expr ::= '[' expr_list ']' | '[' array_expr_list ']' | '[' ']'
array_expr_list ::= array_expr | array_expr_list ',' array_expr
extract_list ::= extract_arg FROM a_expr |
extract_arg ::= IDENT | YEAR_P | MONTH_P | DAY_P | HOUR_P | MINUTE_P | SECOND_P | Sconst
unicode_normal_form ::= NFC | NFD | NFKC | NFKD
overlay_list ::= a_expr overlay_placing substr_from substr_for | a_expr overlay_placing substr_from
overlay_placing ::= PLACING a_expr
position_list ::= b_expr IN_P b_expr |
substr_list ::= a_expr substr_from substr_for | a_expr substr_for substr_from | a_expr substr_from | a_expr substr_for | expr_list |
substr_from ::= FROM a_expr
substr_for ::= FOR a_expr
trim_list ::= a_expr FROM expr_list | FROM expr_list | expr_list
in_expr ::= select_with_parens | '(' expr_list ')'
case_expr ::= CASE case_arg when_clause_list case_default END_P
when_clause_list ::= when_clause | when_clause_list when_clause
when_clause ::= WHEN a_expr THEN a_expr
case_default ::= ELSE a_expr |
case_arg ::= a_expr |
columnref ::= ColId | ColId indirection
indirection_el ::= '.' attr_name | '.' '*' | '[' a_expr ']' | '[' opt_slice_bound ':' opt_slice_bound ']'
opt_slice_bound ::= a_expr |
indirection ::= indirection_el | indirection indirection_el
opt_indirection ::= | opt_indirection indirection_el
opt_asymmetric ::= ASYMMETRIC | /*empty*/
opt_target_list ::= target_list |
target_list ::= target_el | target_list ',' target_el
target_el ::= a_expr AS ColLabel | a_expr IDENT | a_expr | '*'
qualified_name_list ::= qualified_name | qualified_name_list ',' qualified_name
qualified_name ::= ColId | ColId indirection
name_list ::= name | name_list ',' name
name ::= ColId
database_name ::= ColId
access_method ::= ColId
attr_name ::= ColLabel
index_name ::= ColId
file_name ::= Sconst
func_name ::= type_function_name | ColId indirection
AexprConst ::= Iconst | FCONST | Sconst | BCONST | XCONST | func_name Sconst | func_name '(' func_arg_list opt_sort_clause ')' Sconst | ConstTypename Sconst | ConstInterval Sconst opt_interval | ConstInterval '(' Iconst ')' Sconst | TRUE_P | FALSE_P | NULL_P
Iconst ::= ICONST
Sconst ::= SCONST
SignedIconst ::= Iconst | '+' Iconst | '-' Iconst
RoleId ::= RoleSpec
RoleSpec ::= NonReservedWord | CURRENT_USER | SESSION_USER
role_list ::= RoleSpec | role_list ',' RoleSpec
ColId ::= IDENT | unreserved_keyword | col_name_keyword
type_function_name ::= IDENT | unreserved_keyword | type_func_name_keyword
NonReservedWord ::= IDENT | unreserved_keyword | col_name_keyword | type_func_name_keyword
ColLabel ::= IDENT | unreserved_keyword | col_name_keyword | type_func_name_keyword | reserved_keyword
unreserved_keyword ::= ABORT_P | ABSOLUTE_P | ACCESS | ACTION | ADD_P | ADMIN | AFTER | AGGREGATE | ALSO | ALTER | ALWAYS | ASSERTION | ASSIGNMENT | AT | ATTACH | ATTRIBUTE | BACKWARD | BEFORE | BEGIN_P | BY | CACHE | CALL | CALLED | CASCADE | CASCADED | CATALOG_P | CHAIN | CHARACTERISTICS | CHECKPOINT | CLASS | CLOSE | CLUSTER | COLUMNS | COMMENT | COMMENTS | COMMIT | COMMITTED | CONFIGURATION | CONFLICT | CONNECTION | CONSTRAINTS | CONTENT_P | CONTINUE_P | CONVERSION_P | COPY | COST | CSV | CUBE | CURRENT_P | CURSOR | CYCLE | DATA_P | DATABASE | DAY_P | DEALLOCATE | DECLARE | DEFAULTS | DEFERRED | DEFINER | DELETE_P | DELIMITER | DELIMITERS | DEPENDS | DETACH | DICTIONARY | DISABLE_P | DISCARD | DOCUMENT_P | DOMAIN_P | DOUBLE_P | DROP | EACH | ENABLE_P | ENCODING | ENCRYPTED | ENUM_P | ESCAPE | EVENT | EXCLUDE | EXCLUDING | EXCLUSIVE | EXECUTE | EXPLAIN | EXPRESSION | EXTENSION | EXTERNAL | FAMILY | FILTER | FIRST_P | FOLLOWING | FORCE | FORWARD | FUNCTION | FUNCTIONS | GENERATED | GLOBAL | GRANTED | GROUPS | HANDLER | HEADER_P | HOLD | HOUR_P | IDENTITY_P | IF_P | IMMEDIATE | IMMUTABLE | IMPLICIT_P | IMPORT_P | INCLUDE | INCLUDING | INCREMENT | INDEX | INDEXES | INHERIT | INHERITS | INLINE_P | INPUT_P | INSENSITIVE | INSERT | INSTEAD | INVOKER | ISOLATION | KEY | LABEL | LANGUAGE | LARGE_P | LAST_P | LEAKPROOF | LEVEL | LISTEN | LOAD | LOCAL | LOCATION | LOCK_P | LOCKED | LOGGED | MAPPING | MATCH | MATERIALIZED | MAXVALUE | METHOD | MINUTE_P | MINVALUE | MODE | MONTH_P | MOVE | NAME_P | NAMES | NEW | NEXT | NFC | NFD | NFKC | NFKD | NO | NORMALIZED | NOTHING | NOTIFY | NOWAIT | NULLS_P | OBJECT_P | OF | OFF | OIDS | OLD | OPERATOR | OPTION | OPTIONS | ORDINALITY | OTHERS | OVER | OVERRIDING | OWNED | OWNER | PARALLEL | PARSER | PARTIAL | PARTITION | PASSING | PASSWORD | PLANS | POLICY | PRECEDING | PREPARE | PREPARED | PRESERVE | PRIOR | PRIVILEGES | PROCEDURAL | PROCEDURE | PROCEDURES | PROGRAM | PUBLICATION | QUOTE | RANGE | READ | REASSIGN | RECHECK | RECURSIVE | REF | REFERENCING | REFRESH | REINDEX | RELATIVE_P | RELEASE | RENAME | REPEATABLE | REPLACE | REPLICA | RESET | RESTART | RESTRICT | RETURNS | REVOKE | ROLE | ROLLBACK | ROLLUP | ROUTINE | ROUTINES | ROWS | RULE | SAVEPOINT | SCHEMA | SCHEMAS | SCROLL | SEARCH | SECOND_P | SECURITY | SEQUENCE | SEQUENCES | SERIALIZABLE | SERVER | SESSION | SET | SETS | SHARE | SHOW | SIMPLE | SKIP | SNAPSHOT | SQL_P | STABLE | STANDALONE_P | START | STATEMENT | STATISTICS | STDIN | STDOUT | STORAGE | STORED | STRICT_P | STRIP_P | SUBSCRIPTION | SUPPORT | SYSID | SYSTEM_P | TABLES | TABLESPACE | TEMP | TEMPLATE | TEMPORARY | TEXT_P | TIES | TRANSACTION | TRANSFORM | TRIGGER | TRUNCATE | TRUSTED | TYPE_P | TYPES_P | UESCAPE | UNBOUNDED | UNCOMMITTED | UNENCRYPTED | UNKNOWN | UNLISTEN | UNLOGGED | UNTIL | UPDATE | VACUUM | VALID | VALIDATE | VALIDATOR | VALUE_P | VARYING | VERSION_P | VIEW | VIEWS | VOLATILE | WHITESPACE_P | WITHIN | WITHOUT | WORK | WRAPPER | WRITE | XML_P | YEAR_P | YES_P | ZONE
col_name_keyword ::= BETWEEN | BIGINT | BIT | BOOLEAN_P | CHAR_P | CHARACTER | COALESCE | DEC | DECIMAL_P | EXISTS | EXTRACT | FLOAT_P | GREATEST | GROUPING | INOUT | INT_P | INTEGER | INTERVAL | LEAST | NATIONAL | NCHAR | NONE | NORMALIZE | NULLIF | NUMERIC | OUT_P | OVERLAY | POSITION | PRECISION | REAL | ROW | SETOF | SMALLINT | SUBSTRING | TIME | TIMESTAMP | TREAT | TRIM | VALUES | VARCHAR | XMLATTRIBUTES | XMLCONCAT | XMLELEMENT | XMLEXISTS | XMLFOREST | XMLNAMESPACES | XMLPARSE | XMLPI | XMLROOT | XMLSERIALIZE | XMLTABLE
type_func_name_keyword ::= AUTHORIZATION | BINARY | COLLATION | CONCURRENTLY | CROSS | CURRENT_SCHEMA | FREEZE | FULL | ILIKE | INNER_P | IS | ISNULL | JOIN | LEFT | LIKE | NATURAL | NOTNULL | OUTER_P | OVERLAPS | RIGHT | SIMILAR | TABLESAMPLE | VERBOSE
reserved_keyword ::= ALL | ANALYSE | ANALYZE | AND | ANY | ARRAY | AS | ASC | ASYMMETRIC | BOTH | CASE | CAST | CHECK | COLLATE | COLUMN | CONSTRAINT | CREATE | CURRENT_CATALOG | CURRENT_DATE | CURRENT_ROLE | CURRENT_TIME | CURRENT_TIMESTAMP | CURRENT_USER | DEFAULT | DEFERRABLE | DESC | DISTINCT | DO | ELSE | END_P | EXCEPT | FALSE_P | FETCH | FOR | FOREIGN | FROM | GRANT | GROUP_P | HAVING | IN_P | INITIALLY | INTERSECT | INTO | LATERAL_P | LEADING | LIMIT | LOCALTIME | LOCALTIMESTAMP | NOT | NULL_P | OFFSET | ON | ONLY | OR | ORDER | PLACING | PRIMARY | REFERENCES | RETURNING | SELECT | SESSION_USER | SOME | SYMMETRIC | TABLE | THEN | TO | TRAILING | TRUE_P | UNION | UNIQUE | USER | USING | VARIADIC | WHEN | WHERE | WINDOW | WITH

// Tokens from postgresql-13.3/src/include/parser/kwlist.h

ABORT_P ::= "abort"
ABSOLUTE_P ::= "absolute"
ACCESS ::= "access"
ACTION ::= "action"
ADD_P ::= "add"
ADMIN ::= "admin"
AFTER ::= "after"
AGGREGATE ::= "aggregate"
ALL ::= "all"
ALSO ::= "also"
ALTER ::= "alter"
ALWAYS ::= "always"
ANALYSE ::= "analyse"
ANALYZE ::= "analyze"
AND ::= "and"
ANY ::= "any"
ARRAY ::= "array"
AS ::= "as"
ASC ::= "asc"
ASSERTION ::= "assertion"
ASSIGNMENT ::= "assignment"
ASYMMETRIC ::= "asymmetric"
AT ::= "at"
ATTACH ::= "attach"
ATTRIBUTE ::= "attribute"
AUTHORIZATION ::= "authorization"
BACKWARD ::= "backward"
BEFORE ::= "before"
BEGIN_P ::= "begin"
BETWEEN ::= "between"
BIGINT ::= "bigint"
BINARY ::= "binary"
BIT ::= "bit"
BOOLEAN_P ::= "boolean"
BOTH ::= "both"
BY ::= "by"
CACHE ::= "cache"
CALL ::= "call"
CALLED ::= "called"
CASCADE ::= "cascade"
CASCADED ::= "cascaded"
CASE ::= "case"
CAST ::= "cast"
CATALOG_P ::= "catalog"
CHAIN ::= "chain"
CHAR_P ::= "char"
CHARACTER ::= "character"
CHARACTERISTICS ::= "characteristics"
CHECK ::= "check"
CHECKPOINT ::= "checkpoint"
CLASS ::= "class"
CLOSE ::= "close"
CLUSTER ::= "cluster"
COALESCE ::= "coalesce"
COLLATE ::= "collate"
COLLATION ::= "collation"
COLUMN ::= "column"
COLUMNS ::= "columns"
COMMENT ::= "comment"
COMMENTS ::= "comments"
COMMIT ::= "commit"
COMMITTED ::= "committed"
CONCURRENTLY ::= "concurrently"
CONFIGURATION ::= "configuration"
CONFLICT ::= "conflict"
CONNECTION ::= "connection"
CONSTRAINT ::= "constraint"
CONSTRAINTS ::= "constraints"
CONTENT_P ::= "content"
CONTINUE_P ::= "continue"
CONVERSION_P ::= "conversion"
COPY ::= "copy"
COST ::= "cost"
CREATE ::= "create"
CROSS ::= "cross"
CSV ::= "csv"
CUBE ::= "cube"
CURRENT_P ::= "current"
CURRENT_CATALOG ::= "current_catalog"
CURRENT_DATE ::= "current_date"
CURRENT_ROLE ::= "current_role"
CURRENT_SCHEMA ::= "current_schema"
CURRENT_TIME ::= "current_time"
CURRENT_TIMESTAMP ::= "current_timestamp"
CURRENT_USER ::= "current_user"
CURSOR ::= "cursor"
CYCLE ::= "cycle"
DATA_P ::= "data"
DATABASE ::= "database"
DAY_P ::= "day"
DEALLOCATE ::= "deallocate"
DEC ::= "dec"
DECIMAL_P ::= "decimal"
DECLARE ::= "declare"
DEFAULT ::= "default"
DEFAULTS ::= "defaults"
DEFERRABLE ::= "deferrable"
DEFERRED ::= "deferred"
DEFINER ::= "definer"
DELETE_P ::= "delete"
DELIMITER ::= "delimiter"
DELIMITERS ::= "delimiters"
DEPENDS ::= "depends"
DESC ::= "desc"
DETACH ::= "detach"
DICTIONARY ::= "dictionary"
DISABLE_P ::= "disable"
DISCARD ::= "discard"
DISTINCT ::= "distinct"
DO ::= "do"
DOCUMENT_P ::= "document"
DOMAIN_P ::= "domain"
DOUBLE_P ::= "double"
DROP ::= "drop"
EACH ::= "each"
ELSE ::= "else"
ENABLE_P ::= "enable"
ENCODING ::= "encoding"
ENCRYPTED ::= "encrypted"
END_P ::= "end"
ENUM_P ::= "enum"
ESCAPE ::= "escape"
EVENT ::= "event"
EXCEPT ::= "except"
EXCLUDE ::= "exclude"
EXCLUDING ::= "excluding"
EXCLUSIVE ::= "exclusive"
EXECUTE ::= "execute"
EXISTS ::= "exists"
EXPLAIN ::= "explain"
EXPRESSION ::= "expression"
EXTENSION ::= "extension"
EXTERNAL ::= "external"
EXTRACT ::= "extract"
FALSE_P ::= "false"
FAMILY ::= "family"
FETCH ::= "fetch"
FILTER ::= "filter"
FIRST_P ::= "first"
FLOAT_P ::= "float"
FOLLOWING ::= "following"
FOR ::= "for"
FORCE ::= "force"
FOREIGN ::= "foreign"
FORWARD ::= "forward"
FREEZE ::= "freeze"
FROM ::= "from"
FULL ::= "full"
FUNCTION ::= "function"
FUNCTIONS ::= "functions"
GENERATED ::= "generated"
GLOBAL ::= "global"
GRANT ::= "grant"
GRANTED ::= "granted"
GREATEST ::= "greatest"
GROUP_P ::= "group"
GROUPING ::= "grouping"
GROUPS ::= "groups"
HANDLER ::= "handler"
HAVING ::= "having"
HEADER_P ::= "header"
HOLD ::= "hold"
HOUR_P ::= "hour"
IDENTITY_P ::= "identity"
IF_P ::= "if"
ILIKE ::= "ilike"
IMMEDIATE ::= "immediate"
IMMUTABLE ::= "immutable"
IMPLICIT_P ::= "implicit"
IMPORT_P ::= "import"
IN_P ::= "in"
INCLUDE ::= "include"
INCLUDING ::= "including"
INCREMENT ::= "increment"
INDEX ::= "index"
INDEXES ::= "indexes"
INHERIT ::= "inherit"
INHERITS ::= "inherits"
INITIALLY ::= "initially"
INLINE_P ::= "inline"
INNER_P ::= "inner"
INOUT ::= "inout"
INPUT_P ::= "input"
INSENSITIVE ::= "insensitive"
INSERT ::= "insert"
INSTEAD ::= "instead"
INT_P ::= "int"
INTEGER ::= "integer"
INTERSECT ::= "intersect"
INTERVAL ::= "interval"
INTO ::= "into"
INVOKER ::= "invoker"
IS ::= "is"
ISNULL ::= "isnull"
ISOLATION ::= "isolation"
JOIN ::= "join"
KEY ::= "key"
LABEL ::= "label"
LANGUAGE ::= "language"
LARGE_P ::= "large"
LAST_P ::= "last"
LATERAL_P ::= "lateral"
LEADING ::= "leading"
LEAKPROOF ::= "leakproof"
LEAST ::= "least"
LEFT ::= "left"
LEVEL ::= "level"
LIKE ::= "like"
LIMIT ::= "limit"
LISTEN ::= "listen"
LOAD ::= "load"
LOCAL ::= "local"
LOCALTIME ::= "localtime"
LOCALTIMESTAMP ::= "localtimestamp"
LOCATION ::= "location"
LOCK_P ::= "lock"
LOCKED ::= "locked"
LOGGED ::= "logged"
MAPPING ::= "mapping"
MATCH ::= "match"
MATERIALIZED ::= "materialized"
MAXVALUE ::= "maxvalue"
METHOD ::= "method"
MINUTE_P ::= "minute"
MINVALUE ::= "minvalue"
MODE ::= "mode"
MONTH_P ::= "month"
MOVE ::= "move"
NAME_P ::= "name"
NAMES ::= "names"
NATIONAL ::= "national"
NATURAL ::= "natural"
NCHAR ::= "nchar"
NEW ::= "new"
NEXT ::= "next"
NFC ::= "nfc"
NFD ::= "nfd"
NFKC ::= "nfkc"
NFKD ::= "nfkd"
NO ::= "no"
NONE ::= "none"
NORMALIZE ::= "normalize"
NORMALIZED ::= "normalized"
NOT ::= "not"
NOTHING ::= "nothing"
NOTIFY ::= "notify"
NOTNULL ::= "notnull"
NOWAIT ::= "nowait"
NULL_P ::= "null"
NULLIF ::= "nullif"
NULLS_P ::= "nulls"
NUMERIC ::= "numeric"
OBJECT_P ::= "object"
OF ::= "of"
OFF ::= "off"
OFFSET ::= "offset"
OIDS ::= "oids"
OLD ::= "old"
ON ::= "on"
ONLY ::= "only"
OPERATOR ::= "operator"
OPTION ::= "option"
OPTIONS ::= "options"
OR ::= "or"
ORDER ::= "order"
ORDINALITY ::= "ordinality"
OTHERS ::= "others"
OUT_P ::= "out"
OUTER_P ::= "outer"
OVER ::= "over"
OVERLAPS ::= "overlaps"
OVERLAY ::= "overlay"
OVERRIDING ::= "overriding"
OWNED ::= "owned"
OWNER ::= "owner"
PARALLEL ::= "parallel"
PARSER ::= "parser"
PARTIAL ::= "partial"
PARTITION ::= "partition"
PASSING ::= "passing"
PASSWORD ::= "password"
PLACING ::= "placing"
PLANS ::= "plans"
POLICY ::= "policy"
POSITION ::= "position"
PRECEDING ::= "preceding"
PRECISION ::= "precision"
PREPARE ::= "prepare"
PREPARED ::= "prepared"
PRESERVE ::= "preserve"
PRIMARY ::= "primary"
PRIOR ::= "prior"
PRIVILEGES ::= "privileges"
PROCEDURAL ::= "procedural"
PROCEDURE ::= "procedure"
PROCEDURES ::= "procedures"
PROGRAM ::= "program"
PUBLICATION ::= "publication"
QUOTE ::= "quote"
RANGE ::= "range"
READ ::= "read"
REAL ::= "real"
REASSIGN ::= "reassign"
RECHECK ::= "recheck"
RECURSIVE ::= "recursive"
REF ::= "ref"
REFERENCES ::= "references"
REFERENCING ::= "referencing"
REFRESH ::= "refresh"
REINDEX ::= "reindex"
RELATIVE_P ::= "relative"
RELEASE ::= "release"
RENAME ::= "rename"
REPEATABLE ::= "repeatable"
REPLACE ::= "replace"
REPLICA ::= "replica"
RESET ::= "reset"
RESTART ::= "restart"
RESTRICT ::= "restrict"
RETURNING ::= "returning"
RETURNS ::= "returns"
REVOKE ::= "revoke"
RIGHT ::= "right"
ROLE ::= "role"
ROLLBACK ::= "rollback"
ROLLUP ::= "rollup"
ROUTINE ::= "routine"
ROUTINES ::= "routines"
ROW ::= "row"
ROWS ::= "rows"
RULE ::= "rule"
SAVEPOINT ::= "savepoint"
SCHEMA ::= "schema"
SCHEMAS ::= "schemas"
SCROLL ::= "scroll"
SEARCH ::= "search"
SECOND_P ::= "second"
SECURITY ::= "security"
SELECT ::= "select"
SEQUENCE ::= "sequence"
SEQUENCES ::= "sequences"
SERIALIZABLE ::= "serializable"
SERVER ::= "server"
SESSION ::= "session"
SESSION_USER ::= "session_user"
SET ::= "set"
SETOF ::= "setof"
SETS ::= "sets"
SHARE ::= "share"
SHOW ::= "show"
SIMILAR ::= "similar"
SIMPLE ::= "simple"
SKIP ::= "skip"
SMALLINT ::= "smallint"
SNAPSHOT ::= "snapshot"
SOME ::= "some"
SQL_P ::= "sql"
STABLE ::= "stable"
STANDALONE_P ::= "standalone"
START ::= "start"
STATEMENT ::= "statement"
STATISTICS ::= "statistics"
STDIN ::= "stdin"
STDOUT ::= "stdout"
STORAGE ::= "storage"
STORED ::= "stored"
STRICT_P ::= "strict"
STRIP_P ::= "strip"
SUBSCRIPTION ::= "subscription"
SUBSTRING ::= "substring"
SUPPORT ::= "support"
SYMMETRIC ::= "symmetric"
SYSID ::= "sysid"
SYSTEM_P ::= "system"
TABLE ::= "table"
TABLES ::= "tables"
TABLESAMPLE ::= "tablesample"
TABLESPACE ::= "tablespace"
TEMP ::= "temp"
TEMPLATE ::= "template"
TEMPORARY ::= "temporary"
TEXT_P ::= "text"
THEN ::= "then"
TIES ::= "ties"
TIME ::= "time"
TIMESTAMP ::= "timestamp"
TO ::= "to"
TRAILING ::= "trailing"
TRANSACTION ::= "transaction"
TRANSFORM ::= "transform"
TREAT ::= "treat"
TRIGGER ::= "trigger"
TRIM ::= "trim"
TRUE_P ::= "true"
TRUNCATE ::= "truncate"
TRUSTED ::= "trusted"
TYPE_P ::= "type"
TYPES_P ::= "types"
UESCAPE ::= "uescape"
UNBOUNDED ::= "unbounded"
UNCOMMITTED ::= "uncommitted"
UNENCRYPTED ::= "unencrypted"
UNION ::= "union"
UNIQUE ::= "unique"
UNKNOWN ::= "unknown"
UNLISTEN ::= "unlisten"
UNLOGGED ::= "unlogged"
UNTIL ::= "until"
UPDATE ::= "update"
USER ::= "user"
USING ::= "using"
VACUUM ::= "vacuum"
VALID ::= "valid"
VALIDATE ::= "validate"
VALIDATOR ::= "validator"
VALUE_P ::= "value"
VALUES ::= "values"
VARCHAR ::= "varchar"
VARIADIC ::= "variadic"
VARYING ::= "varying"
VERBOSE ::= "verbose"
VERSION_P ::= "version"
VIEW ::= "view"
VIEWS ::= "views"
VOLATILE ::= "volatile"
WHEN ::= "when"
WHERE ::= "where"
WHITESPACE_P ::= "whitespace"
WINDOW ::= "window"
WITH ::= "with"
WITHIN ::= "within"
WITHOUT ::= "without"
WORK ::= "work"
WRAPPER ::= "wrapper"
WRITE ::= "write"
XML_P ::= "xml"
XMLATTRIBUTES ::= "xmlattributes"
XMLCONCAT ::= "xmlconcat"
XMLELEMENT ::= "xmlelement"
XMLEXISTS ::= "xmlexists"
XMLFOREST ::= "xmlforest"
XMLNAMESPACES ::= "xmlnamespaces"
XMLPARSE ::= "xmlparse"
XMLPI ::= "xmlpi"
XMLROOT ::= "xmlroot"
XMLSERIALIZE ::= "xmlserialize"
XMLTABLE ::= "xmltable"
YEAR_P ::= "year"
YES_P ::= "yes"
ZONE ::= "zone"
====
2021-07-01
17:03 Reply: Integrated user management for a group of repositories (artifact: f67bf8f56e user: mingodad)
Thank you for reply !

But the point for my post was just that would be nice if I could use the same login in all public repositories for one organization like sqlite.org.

Why not also have a group for self registered users ?

Why a user need several accounts like one for sqlite other for fossil-scm other for pikchr.org, ... ?
16:18 Post: Integrated user management for a group of repositories (artifact: a7e7323894 user: mingodad)
I just needed to post some comments on https://pikchr.org/home/forum and https://fossil-scm.org/forum/forum and noticed that sqlite.org do not have integrated user management between their projects.

I know this is a fossil-scm issue but because I only have an account here I'm posting it here.

How hard would be to have fossil-scm to manage/share user management between several repositories of the same organization ?

It seems that it makes sense and provide a better user experience for it's users.

Cheers !
2021-06-30
17:47 Reply: Duplicated rows (and missing rows) when SELECTing with ORDER BY (artifact: 7ff119ccca user: mingodad)
In cases like your why not scramble the data and see if the problem remain there so you can publish it ?

Example:
====
id, name, age, nationality
1, DUDE, 24, UK
2, CARL, 12, SP
====

Scramble to (for numbers not unique use randon):
====
id, f2, f3, f4
1, f21, 8902, f41 
2, f22, 1092, f42 
====
2021-06-29
16:13 Post: Whole grammar railroad diagram (artifact: c7a0c2a232 user: mingodad)
After doing several grammar conversions to the kind of EBNF understood by https://www.bottlecaps.de/rr/ui to generate railroad diagrams see bellow the converted src/parser.y with some hand made changes to allow view it at https://www.bottlecaps.de/rr/ui the order of the rules could be changed to a better view of the railroad diagram. Copy and paste the EBNF bellow on https://www.bottlecaps.de/rr/ui tab Edit Grammar then switch to the tab View Diagram.

This script that uses Lua pattern matching to process src/parser.y:
====
auto fname = "sqlite3/src/parse.y";
auto txt = readfile(fname);

txt = txt.gsub("%%include%s*%b{}", "");
txt = txt.gsub("%%syntax_error%s*%b{}", "");
txt = txt.gsub("%%stack_overflow%s*%b{}", "");
txt = txt.gsub("%%default_type%s*%b{}", "");
txt = txt.gsub("%%extra_context%s*%b{}", "");
txt = txt.gsub("//[^\n]*", "");
txt = txt.gsub("/%*.-%*/", "");
txt = txt.gsub("%%token[^\n]+", "");
txt = txt.gsub("%%name[^\n]+", "");
txt = txt.gsub("%%left[^\n]+", "");
txt = txt.gsub("%%right[^\n]+", "");
txt = txt.gsub("%%nonassoc[^\n]+", "");
txt = txt.gsub("%%wildcard[^\n]+", "");
txt = txt.gsub("%%type%s+.-%b{}", "");
txt = txt.gsub("%%destructor%s+.-%b{}", "");
txt = txt.gsub("%.%s*%b{}", ".");
txt = txt.gsub("%b{}", " ");
txt = txt.gsub("%b()", " ");

print(txt);

auto rules = {};
auto rule_order = [];

txt.gmatch(
	"([%w_]+)%s*::=([^.]+)%.",
	function(k, v)
	{
		v = v.trim();
		if(v.len() == 0) v = "/* empty */";
		v = v.gsub("%s+", " ");
		if(v.indexOf("|") >= 0) v = "(" + v + ")";
		auto ev = table_rawget(rules, k, null);
		if(!ev) {
			rules[k] <- v;
			rule_order.append(k);
		}
		else
		{
			rules[k] = ev + "\n\t| " + v;
		}
		return true;
	}
);

foreach(idx, k in rule_order) print(/*idx,*/ k, "::=", rules[k]);

====

EBNF for https://www.bottlecaps.de/rr/ui :
====
/*
From src/parser.y
*/

input	::=	cmdlist
cmdlist	::=	cmdlist ecmd
	| ecmd
ecmd	::=	SEMI
	| cmdx SEMI
	| explain cmdx SEMI
explain	::=	EXPLAIN
	| EXPLAIN QUERY PLAN
cmdx	::=	cmd
cmd	::=	BEGIN transtype trans_opt
	| (COMMIT|END trans_opt)
	| ROLLBACK trans_opt
	| SAVEPOINT nm
	| RELEASE savepoint_opt nm
	| ROLLBACK trans_opt TO savepoint_opt nm
	| create_table create_table_args
	| DROP TABLE ifexists fullname
	| createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select
	| DROP VIEW ifexists fullname
	| select
	| with DELETE FROM xfullname indexed_opt where_opt_ret orderby_opt limit_opt
	| with DELETE FROM xfullname indexed_opt where_opt_ret
	| with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret orderby_opt limit_opt
	| with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret
	| with insert_cmd INTO xfullname idlist_opt select upsert
	| with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning
	| createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt
	| DROP INDEX ifexists fullname
	| VACUUM vinto
	| VACUUM nm vinto
	| PRAGMA nm dbnm
	| PRAGMA nm dbnm EQ nmnum
	| PRAGMA nm dbnm LP nmnum RP
	| PRAGMA nm dbnm EQ minus_num
	| PRAGMA nm dbnm LP minus_num RP
	| createkw trigger_decl BEGIN trigger_cmd_list END
	| DROP TRIGGER ifexists fullname
	| ATTACH database_kw_opt expr AS expr key_opt
	| DETACH database_kw_opt expr
	| REINDEX
	| REINDEX nm dbnm
	| ANALYZE
	| ANALYZE nm dbnm
	| ALTER TABLE fullname RENAME TO nm
	| ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist
	| ALTER TABLE fullname DROP kwcolumn_opt nm
	| ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm
	| create_vtab
	| create_vtab LP vtabarglist RP
trans_opt	::=	/* empty */
	| TRANSACTION
	| TRANSACTION nm
transtype	::=	/* empty */
	| DEFERRED
	| IMMEDIATE
	| EXCLUSIVE
savepoint_opt	::=	SAVEPOINT
	| /* empty */
create_table	::=	createkw temp TABLE ifnotexists nm dbnm
createkw	::=	CREATE
ifnotexists	::=	/* empty */
	| IF NOT EXISTS
temp	::=	TEMP
	| /* empty */
create_table_args	::=	LP columnlist conslist_opt RP table_options
	| AS select
table_options	::=	/* empty */
	| WITHOUT nm
columnlist	::=	columnlist COMMA columnname carglist
	| columnname carglist
columnname	::=	nm typetoken
nm	::=	id
	| STRING
	| JOIN_KW
typetoken	::=	/* empty */
	| typename
	| typename LP signed RP
	| typename LP signed COMMA signed RP
typename	::=	ids
	| typename ids
signed	::=	plus_num
	| minus_num
scanpt	::=	/* empty */
scantok	::=	/* empty */
carglist	::=	carglist ccons
	| /* empty */
ccons	::=	CONSTRAINT nm
	| DEFAULT scantok term
	| DEFAULT LP expr RP
	| DEFAULT PLUS scantok term
	| DEFAULT MINUS scantok term
	| DEFAULT scantok id
	| NULL onconf
	| NOT NULL onconf
	| PRIMARY KEY sortorder onconf autoinc
	| UNIQUE onconf
	| CHECK LP expr RP
	| REFERENCES nm eidlist_opt refargs
	| defer_subclause
	| COLLATE ids
	| GENERATED ALWAYS AS generated
	| AS generated
generated	::=	LP expr RP
	| LP expr RP ID
autoinc	::=	/* empty */
	| AUTOINCR
refargs	::=	/* empty */
	| refargs refarg
refarg	::=	MATCH nm
	| ON INSERT refact
	| ON DELETE refact
	| ON UPDATE refact
refact	::=	SET NULL
	| SET DEFAULT
	| CASCADE
	| RESTRICT
	| NO ACTION
defer_subclause	::=	NOT DEFERRABLE init_deferred_pred_opt
	| DEFERRABLE init_deferred_pred_opt
init_deferred_pred_opt	::=	/* empty */
	| INITIALLY DEFERRED
	| INITIALLY IMMEDIATE
conslist_opt	::=	/* empty */
	| COMMA conslist
conslist	::=	conslist tconscomma tcons
	| tcons
tconscomma	::=	COMMA
	| /* empty */
tcons	::=	CONSTRAINT nm
	| PRIMARY KEY LP sortlist autoinc RP onconf
	| UNIQUE LP sortlist RP onconf
	| CHECK LP expr RP onconf
	| FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt
defer_subclause_opt	::=	/* empty */
	| defer_subclause
onconf	::=	/* empty */
	| ON CONFLICT resolvetype
orconf	::=	/* empty */
	| OR resolvetype
resolvetype	::=	raisetype
	| IGNORE
	| REPLACE
ifexists	::=	IF EXISTS
	| /* empty */
select	::=	WITH wqlist selectnowith
	| WITH RECURSIVE wqlist selectnowith
	| selectnowith
selectnowith	::=	oneselect
	| selectnowith multiselect_op oneselect
multiselect_op	::=	UNION
	| UNION ALL
	| (EXCEPT|INTERSECT)
oneselect	::=	SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt
	| SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt
	| values
values	::=	VALUES LP nexprlist RP
	| values COMMA LP nexprlist RP
distinct	::=	DISTINCT
	| ALL
	| /* empty */
sclp	::=	selcollist COMMA
	| /* empty */
selcollist	::=	sclp scanpt expr scanpt as
	| sclp scanpt STAR
	| sclp scanpt nm DOT STAR
as	::=	AS nm
	| ids
	| /* empty */
from	::=	/* empty */
	| FROM seltablist
stl_prefix	::=	seltablist joinop
	| /* empty */
seltablist	::=	stl_prefix nm dbnm as indexed_opt on_opt using_opt
	| stl_prefix nm dbnm LP exprlist RP as on_opt using_opt
	| stl_prefix LP select RP as on_opt using_opt
	| stl_prefix LP seltablist RP as on_opt using_opt
dbnm	::=	/* empty */
	| DOT nm
fullname	::=	nm
	| nm DOT nm
xfullname	::=	nm
	| nm DOT nm
	| nm DOT nm AS nm
	| nm AS nm
joinop	::=	(COMMA|JOIN)
	| JOIN_KW JOIN
	| JOIN_KW nm JOIN
	| JOIN_KW nm nm JOIN
on_opt	::=	ON expr
	| /* empty */
indexed_opt	::=	/* empty */
	| INDEXED BY nm
	| NOT INDEXED
using_opt	::=	USING LP idlist RP
	| /* empty */
orderby_opt	::=	/* empty */
	| ORDER BY sortlist
sortlist	::=	sortlist COMMA expr sortorder nulls
	| expr sortorder nulls
sortorder	::=	ASC
	| DESC
	| /* empty */
nulls	::=	NULLS FIRST
	| NULLS LAST
	| /* empty */
groupby_opt	::=	/* empty */
	| GROUP BY nexprlist
having_opt	::=	/* empty */
	| HAVING expr
limit_opt	::=	/* empty */
	| LIMIT expr
	| LIMIT expr OFFSET expr
	| LIMIT expr COMMA expr
where_opt	::=	/* empty */
	| WHERE expr
where_opt_ret	::=	/* empty */
	| WHERE expr
	| RETURNING selcollist
	| WHERE expr RETURNING selcollist
setlist	::=	setlist COMMA nm EQ expr
	| setlist COMMA LP idlist RP EQ expr
	| nm EQ expr
	| LP idlist RP EQ expr
upsert	::=	/* empty */
	| RETURNING selcollist
	| ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert
	| ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert
	| ON CONFLICT DO NOTHING returning
	| ON CONFLICT DO UPDATE SET setlist where_opt returning
returning	::=	RETURNING selcollist
	| /* empty */
insert_cmd	::=	INSERT orconf
	| REPLACE
idlist_opt	::=	/* empty */
	| LP idlist RP
idlist	::=	idlist COMMA nm
	| nm
expr	::=	term
	| LP expr RP
	| id
	| JOIN_KW
	| nm DOT nm
	| nm DOT nm DOT nm
	| VARIABLE
	| expr COLLATE ids
	| CAST LP expr AS typetoken RP
	| id LP distinct exprlist RP
	| id LP STAR RP
	| id LP distinct exprlist RP filter_over
	| id LP STAR RP filter_over
	| LP nexprlist COMMA expr RP
	| expr AND expr
	| expr OR expr
	| (expr LT|GT|GE|LE expr)
	| (expr EQ|NE expr)
	| (expr BITAND|BITOR|LSHIFT|RSHIFT expr)
	| (expr PLUS|MINUS expr)
	| (expr STAR|SLASH|REM expr)
	| expr CONCAT expr
	| expr likeop expr
	| expr likeop expr ESCAPE expr
	| (expr ISNULL|NOTNULL)
	| expr NOT NULL
	| expr IS expr
	| expr IS NOT expr
	| NOT expr
	| BITNOT expr
	| (PLUS|MINUS expr)
	| expr between_op expr AND expr
	| expr in_op LP exprlist RP
	| LP select RP
	| expr in_op LP select RP
	| expr in_op nm dbnm paren_exprlist
	| EXISTS LP select RP
	| CASE case_operand case_exprlist case_else END
	| RAISE LP IGNORE RP
	| RAISE LP raisetype COMMA nm RP
term	::=	(NULL|FLOAT|BLOB)
	| STRING
	| INTEGER
	| CTIME_KW
likeop	::=	(LIKE_KW|MATCH)
	| (NOT LIKE_KW|MATCH)
between_op	::=	BETWEEN
	| NOT BETWEEN
in_op	::=	IN
	| NOT IN
case_exprlist	::=	case_exprlist WHEN expr THEN expr
	| WHEN expr THEN expr
case_else	::=	ELSE expr
	| /* empty */
case_operand	::=	expr
	| /* empty */
exprlist	::=	nexprlist
	| /* empty */
nexprlist	::=	nexprlist COMMA expr
	| expr
paren_exprlist	::=	/* empty */
	| LP exprlist RP
uniqueflag	::=	UNIQUE
	| /* empty */
eidlist_opt	::=	/* empty */
	| LP eidlist RP
eidlist	::=	eidlist COMMA nm collate sortorder
	| nm collate sortorder
collate	::=	/* empty */
	| COLLATE ids
vinto	::=	INTO expr
	| /* empty */
nmnum	::=	plus_num
	| nm
	| ON
	| DELETE
	| DEFAULT
plus_num	::=	PLUS number
	| number
minus_num	::=	MINUS number
trigger_decl	::=	temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause
trigger_time	::=	(BEFORE|AFTER)
	| INSTEAD OF
	| /* empty */
trigger_event	::=	(DELETE|INSERT)
	| UPDATE
	| UPDATE OF idlist
foreach_clause	::=	/* empty */
	| FOR EACH ROW
when_clause	::=	/* empty */
	| WHEN expr
trigger_cmd_list	::=	trigger_cmd_list trigger_cmd SEMI
	| trigger_cmd SEMI
trnm	::=	nm
	| nm DOT nm
tridxby	::=	/* empty */
	| INDEXED BY nm
	| NOT INDEXED
trigger_cmd	::=	UPDATE orconf trnm tridxby SET setlist from where_opt scanpt
	| scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt
	| DELETE FROM trnm tridxby where_opt scanpt
	| scanpt select scanpt
raisetype	::=	ROLLBACK
	| ABORT
	| FAIL
key_opt	::=	/* empty */
	| KEY expr
database_kw_opt	::=	DATABASE
	| /* empty */
add_column_fullname	::=	fullname
kwcolumn_opt	::=	/* empty */
	| COLUMNKW
create_vtab	::=	createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm
vtabarglist	::=	vtabarg
	| vtabarglist COMMA vtabarg
vtabarg	::=	/* empty */
	| vtabarg vtabargtoken
vtabargtoken	::=	ANY
	| lp anylist RP
lp	::=	LP
anylist	::=	/* empty */
	| anylist LP anylist RP
	| anylist ANY
with	::=	/* empty */
	| WITH wqlist
	| WITH RECURSIVE wqlist
wqas	::=	AS
	| AS MATERIALIZED
	| AS NOT MATERIALIZED
wqitem	::=	nm eidlist_opt wqas LP select RP
wqlist	::=	wqitem
	| wqlist COMMA wqitem
windowdefn_list	::=	windowdefn
	| windowdefn_list COMMA windowdefn
windowdefn	::=	nm AS LP window RP
window	::=	PARTITION BY nexprlist orderby_opt frame_opt
	| nm PARTITION BY nexprlist orderby_opt frame_opt
	| ORDER BY sortlist frame_opt
	| nm ORDER BY sortlist frame_opt
	| frame_opt
	| nm frame_opt
frame_opt	::=	/* empty */
	| range_or_rows frame_bound_s frame_exclude_opt
	| range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt
range_or_rows	::=	(RANGE|ROWS|GROUPS)
frame_bound_s	::=	frame_bound
	| UNBOUNDED PRECEDING
frame_bound_e	::=	frame_bound
	| UNBOUNDED FOLLOWING
frame_bound	::=	(expr PRECEDING|FOLLOWING)
	| CURRENT ROW
frame_exclude_opt	::=	/* empty */
	| EXCLUDE frame_exclude
frame_exclude	::=	NO OTHERS
	| CURRENT ROW
	| (GROUP|TIES)
window_clause	::=	WINDOW windowdefn_list
filter_over	::=	filter_clause over_clause
	| over_clause
	| filter_clause
over_clause	::=	OVER LP window RP
	| OVER nm
filter_clause	::=	FILTER LP WHERE expr RP

// Tokens

ABORT ::= "ABORT"
ACTION ::= "ACTION"
ADD ::= "ADD"
AFTER ::= "AFTER"
ALL ::= "ALL"
ALTER ::= "ALTER"
ALWAYS ::= "ALWAYS"
ANALYZE ::= "ANALYZE"
AND ::= "AND"
AS ::= "AS"
ASC ::= "ASC"
ATTACH ::= "ATTACH"
AUTOINCREMENT ::= "AUTOINCREMENT"
BEFORE ::= "BEFORE"
BEGIN ::= "BEGIN"
BETWEEN ::= "BETWEEN"
BY ::= "BY"
CASCADE ::= "CASCADE"
CASE ::= "CASE"
CAST ::= "CAST"
CHECK ::= "CHECK"
COLLATE ::= "COLLATE"
COLUMN ::= "COLUMN"
COMMIT ::= "COMMIT"
CONFLICT ::= "CONFLICT"
CONSTRAINT ::= "CONSTRAINT"
CREATE ::= "CREATE"
CROSS ::= "CROSS"
CURRENT ::= "CURRENT"
CURRENT_DATE ::= "CURRENT_DATE"
CURRENT_TIME ::= "CURRENT_TIME"
CURRENT_TIMESTAMP ::= "CURRENT_TIMESTAMP"
DATABASE ::= "DATABASE"
DEFAULT ::= "DEFAULT"
DEFERRED ::= "DEFERRED"
DEFERRABLE ::= "DEFERRABLE"
DELETE ::= "DELETE"
DESC ::= "DESC"
DETACH ::= "DETACH"
DISTINCT ::= "DISTINCT"
DO ::= "DO"
DROP ::= "DROP"
END ::= "END"
EACH ::= "EACH"
ELSE ::= "ELSE"
ESCAPE ::= "ESCAPE"
EXCEPT ::= "EXCEPT"
EXCLUSIVE ::= "EXCLUSIVE"
EXCLUDE ::= "EXCLUDE"
EXISTS ::= "EXISTS"
EXPLAIN ::= "EXPLAIN"
FAIL ::= "FAIL"
FILTER ::= "FILTER"
FIRST ::= "FIRST"
FOLLOWING ::= "FOLLOWING"
FOR ::= "FOR"
FOREIGN ::= "FOREIGN"
FROM ::= "FROM"
FULL ::= "FULL"
GENERATED ::= "GENERATED"
GLOB ::= "GLOB"
GROUP ::= "GROUP"
GROUPS ::= "GROUPS"
HAVING ::= "HAVING"
IF ::= "IF"
IGNORE ::= "IGNORE"
IMMEDIATE ::= "IMMEDIATE"
IN ::= "IN"
INDEX ::= "INDEX"
INDEXED ::= "INDEXED"
INITIALLY ::= "INITIALLY"
INNER ::= "INNER"
INSERT ::= "INSERT"
INSTEAD ::= "INSTEAD"
INTERSECT ::= "INTERSECT"
INTO ::= "INTO"
IS ::= "IS"
ISNULL ::= "ISNULL"
JOIN ::= "JOIN"
KEY ::= "KEY"
LAST ::= "LAST"
LEFT ::= "LEFT"
LIKE ::= "LIKE"
LIMIT ::= "LIMIT"
MATCH ::= "MATCH"
MATERIALIZED ::= "MATERIALIZED"
NATURAL ::= "NATURAL"
NO ::= "NO"
NOT ::= "NOT"
NOTHING ::= "NOTHING"
NOTNULL ::= "NOTNULL"
NULL ::= "NULL"
NULLS ::= "NULLS"
OF ::= "OF"
OFFSET ::= "OFFSET"
ON ::= "ON"
OR ::= "OR"
ORDER ::= "ORDER"
OTHERS ::= "OTHERS"
OUTER ::= "OUTER"
OVER ::= "OVER"
PARTITION ::= "PARTITION"
PLAN ::= "PLAN"
PRAGMA ::= "PRAGMA"
PRECEDING ::= "PRECEDING"
PRIMARY ::= "PRIMARY"
QUERY ::= "QUERY"
RAISE ::= "RAISE"
RANGE ::= "RANGE"
RECURSIVE ::= "RECURSIVE"
REFERENCES ::= "REFERENCES"
REGEXP ::= "REGEXP"
REINDEX ::= "REINDEX"
RELEASE ::= "RELEASE"
RENAME ::= "RENAME"
REPLACE ::= "REPLACE"
RESTRICT ::= "RESTRICT"
RETURNING ::= "RETURNING"
RIGHT ::= "RIGHT"
ROLLBACK ::= "ROLLBACK"
ROW ::= "ROW"
ROWS ::= "ROWS"
SAVEPOINT ::= "SAVEPOINT"
SELECT ::= "SELECT"
SET ::= "SET"
TABLE ::= "TABLE"
TEMP ::= "TEMP"
TEMPORARY ::= "TEMPORARY"
THEN ::= "THEN"
TIES ::= "TIES"
TO ::= "TO"
TRANSACTION ::= "TRANSACTION"
TRIGGER ::= "TRIGGER"
UNBOUNDED ::= "UNBOUNDED"
UNION ::= "UNION"
UNIQUE ::= "UNIQUE"
UPDATE ::= "UPDATE"
USING ::= "USING"
VACUUM ::= "VACUUM"
VALUES ::= "VALUES"
VIEW ::= "VIEW"
VIRTUAL ::= "VIRTUAL"
WHEN ::= "WHEN"
WHERE ::= "WHERE"
WINDOW ::= "WINDOW"
WITH ::= "WITH"
WITHOUT ::= "WITHOUT"

PIPE ::= '|'
MINUS ::= '-'
LT ::= '<'
GT ::= '>'
EQ ::= '='
BANG ::= '!'
SLASH ::= '/'
LP ::= '('
RP ::= ')'
SEMI ::= ';'
PLUS ::= '+'
STAR ::= '*'
PERCENT ::= '%'
COMMA ::= ','
AND ::= '&'
TILDA ::= '~'
DOT ::= '.'
====
2021-06-18
07:28 Post: www3.sqlite.org out of sync (artifact: 69dc4a288b user: mingodad)
It seems that www3.sqlite.org out of sync again, see https://www3.sqlite.org/src/timeline?n=100&y=ci
2021-03-24
14:07 Reply: Maybe fossil problem ? (artifact: 56fa8d5800 user: mingodad)
I think that maybe I had done something like described by "(3) By anonymous on 2021-03-24 11:31:16", other than that the usual daily "fossil update".

And maybe would be nice to have the end-of-line spaces trimmed by default.
09:10 Post: Maybe fossil problem ? (artifact: 6c08297094 user: mingodad)
I use to follow the sqlite3 development almost daily (updating my cloned repository) and today I'm getting a conflict in a file that I don't have made any custom changes src/epr.c (see below) and I'm reporting it here just in case it can give a clue in how (if possible/convenient) improve fossil (if at all because it seems strange that it generates a conflict following the main repository).

------
ExprList *sqlite3ExprListAppend(
  Parse *pParse,          /* Parsing context */
  ExprList *pList,        /* List to which to append. Might be NULL */
  Expr *pExpr             /* Expression to be appended. Might be NULL */
){
  struct ExprList_item *pItem;
  if( pList==0 ){
<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
    pList = sqlite3DbMallocRawNN(db, sizeof(ExprList) );
    if( pList==0 ){
      goto no_mem;
    }
    pList->nExpr = 0;
  }else if( (pList->nExpr & (pList->nExpr-1))==0 ){
    ExprList *pNew;
    pNew = sqlite3DbRealloc(db, pList,
         sizeof(*pList)+(2*(sqlite3_int64)pList->nExpr-1)*sizeof(pList->a[0]));
    if( pNew==0 ){
      goto no_mem;
    }
    pList = pNew;
||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
    pList = sqlite3DbMallocRawNN(db, sizeof(ExprList) );
    if( pList==0 ){
      goto no_mem;
    }
    pList->nExpr = 0;
  }else if( (pList->nExpr & (pList->nExpr-1))==0 ){
    ExprList *pNew;
    pNew = sqlite3DbRealloc(db, pList, 
         sizeof(*pList)+(2*(sqlite3_int64)pList->nExpr-1)*sizeof(pList->a[0]));
    if( pNew==0 ){
      goto no_mem;
    }
    pList = pNew;
======= MERGED IN content follows ==================================
    return sqlite3ExprListAppendNew(pParse->db,pExpr);
  }
  if( pList->nAlloc<pList->nExpr+1 ){
    return sqlite3ExprListAppendGrow(pParse->db,pList,pExpr);
>>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  }
  pItem = &pList->a[pList->nExpr++];
  *pItem = zeroItem;
  pItem->pExpr = pExpr;
  return pList;
<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<

no_mem:
  /* Avoid leaking memory if malloc has failed. */
  sqlite3ExprDelete(db, pExpr);
  sqlite3ExprListDelete(db, pList);
  return 0;
||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||

no_mem:     
  /* Avoid leaking memory if malloc has failed. */
  sqlite3ExprDelete(db, pExpr);
  sqlite3ExprListDelete(db, pList);
  return 0;
======= MERGED IN content follows ==================================
>>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
}
------
2021-02-04
09:26 Post: SQLite with insert returning not working as in PostgreSQL (artifact: 33bfa93790 user: mingodad)
Testing the recently welcome added "returning" clause for inserts with this query that does work in PostgreSQL but doesn't in SQLite:

====
create table test(id integer primary key, data text);

with insdata as (insert into test(data) values('one') returning id)
select * from insdata;
====

Is this a limitation of the current implementation ?
More ↓