SQLite User Forum

Whole grammar railroad diagram
Login

Whole grammar railroad diagram

(1) By Domingo (mingodad) on 2021-06-29 16:13:46 [source]

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 ::= '.'
====

(2) By anonymous on 2021-06-29 19:30:20 in reply to 1 [link] [source]

Very cool :)

Similar to the existing https://sqlite.org/syntaxdiagrams.html

Looks nice:

(3) By Domingo (mingodad) on 2021-07-02 09:27:15 in reply to 1 [link] [source]

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"
====

(4) By Domingo (mingodad) on 2021-07-02 10:08:56 in reply to 1 [link] [source]

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"
====

(5) By Domingo (mingodad) on 2021-07-16 09:04:12 in reply to 1 [link] [source]

I also just created the railroad diagram for the FIREBIRD database you can see/get it here https://github.com/FirebirdSQL/firebird/issues/6898

(6) By Domingo (mingodad) on 2021-07-16 11:50:24 in reply to 1 [link] [source]

And here is a manual conversion from an old GOLD parser grammar for TSQL https://github.com/karlatgit/tsql-grammar/issues/1

(7) By Domingo (mingodad) on 2021-07-24 16:25:13 in reply to 1 [link] [source]

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

(8) By Domingo (mingodad) on 2021-07-28 12:24:33 in reply to 1 [link] [source]

And here there is a railroad diagram for a manually converted sql-2003 grammar:

https://github.com/ronsavage/SQL/issues/5#issuecomment-888264796

(9) By Domingo (mingodad) on 2021-08-02 10:00:42 in reply to 1 [link] [source]

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.

(10) By Domingo (mingodad) on 2021-08-04 15:09:03 in reply to 1 [link] [source]

And here I manually converted the SQL-2016 grammar to generate the railroad diagram https://github.com/JakeWheat/sql-overview/issues/6