From e71ad102bfab6983902191e361385ef46ff8caf2 Mon Sep 17 00:00:00 2001 From: Eric Harmeling Date: Tue, 20 Aug 2019 10:41:49 -0400 Subject: [PATCH] CREATE TABLE AS updates: Parameter updates Diagram updates Examples now use MovR New primary key example for partitioning Code PRs: https://github.com/cockroachdb/cockroach/pull/38589 https://github.com/cockroachdb/cockroach/pull/38904 Fixes #5190 --- .../sql/diagrams/create_as_col_qual_list.html | 17 + .../diagrams/create_as_constraint_def.html | 20 + .../v19.2/sql/diagrams/create_table_as.html | 103 +- _includes/v19.2/sql/diagrams/stmt_block.html | 4669 +++++++++-------- v19.2/create-table-as.md | 307 +- v19.2/create-table.md | 2 +- 6 files changed, 2790 insertions(+), 2328 deletions(-) create mode 100644 _includes/v19.2/sql/diagrams/create_as_col_qual_list.html create mode 100644 _includes/v19.2/sql/diagrams/create_as_constraint_def.html diff --git a/_includes/v19.2/sql/diagrams/create_as_col_qual_list.html b/_includes/v19.2/sql/diagrams/create_as_col_qual_list.html new file mode 100644 index 00000000000..791829c3ba3 --- /dev/null +++ b/_includes/v19.2/sql/diagrams/create_as_col_qual_list.html @@ -0,0 +1,17 @@ +
+ + + + +PRIMARY + + +KEY + + +FAMILY + + +family_name + +
diff --git a/_includes/v19.2/sql/diagrams/create_as_constraint_def.html b/_includes/v19.2/sql/diagrams/create_as_constraint_def.html new file mode 100644 index 00000000000..3699d2b1833 --- /dev/null +++ b/_includes/v19.2/sql/diagrams/create_as_constraint_def.html @@ -0,0 +1,20 @@ +
+ + + + +PRIMARY + + +KEY + + +( + + +create_as_params + +) + + +
diff --git a/_includes/v19.2/sql/diagrams/create_table_as.html b/_includes/v19.2/sql/diagrams/create_table_as.html index dbf1028099a..90a36644b4b 100644 --- a/_includes/v19.2/sql/diagrams/create_table_as.html +++ b/_includes/v19.2/sql/diagrams/create_table_as.html @@ -1,50 +1,53 @@ -
- - - - - - CREATE - - - TABLE - - - IF - - - NOT - - - EXISTS - - - - table_name - - - - ( - - - - name - - - - , - - - ) - - - AS - - - - select_stmt - - - - -
\ No newline at end of file +
+ + + + +CREATE + + +TABLE + + +IF + + +NOT + + +EXISTS + + +table_name + +( + + +column_name + + +create_as_col_qual_list + +, + + +column_name + + +create_as_col_qual_list + + +family_def + + +create_as_constraint_def + +) + + +AS + + +select_stmt + +
diff --git a/_includes/v19.2/sql/diagrams/stmt_block.html b/_includes/v19.2/sql/diagrams/stmt_block.html index 77aef97fca3..4dc1438f523 100644 --- a/_includes/v19.2/sql/diagrams/stmt_block.html +++ b/_includes/v19.2/sql/diagrams/stmt_block.html @@ -8,7 +8,7 @@ stmt -

no references


stmt:

+

no references


stmt:

@@ -32,37 +32,34 @@ deallocate_stmt - discard_stmt - - - export_stmt - - - grant_stmt - - - prepare_stmt - - - revoke_stmt - - - savepoint_stmt - - - release_stmt - - - nonpreparable_set_stmt - - - transaction_stmt + discard_stmt + + + grant_stmt + + + prepare_stmt + + + revoke_stmt + + + savepoint_stmt + + + release_stmt + + + nonpreparable_set_stmt + + + transaction_stmt

referenced by:

-


preparable_stmt:

+


preparable_stmt:

@@ -104,28 +101,31 @@ restore_stmt - resume_stmt - - - scrub_stmt - - - select_stmt - - - preparable_set_stmt - - - show_stmt - - - truncate_stmt - - - update_stmt - - - upsert_stmt + resume_stmt + + + export_stmt + + + scrub_stmt + + + select_stmt + + + preparable_set_stmt + + + show_stmt + + + truncate_stmt + + + update_stmt + + + upsert_stmt

referenced by:

-


import_stmt:

+


import_stmt:

@@ -615,79 +586,79 @@ import_format - string_or_placeholder - - INTO - - - table_name - - ( - - - insert_column_list - - ) - - - import_format - - DATA - - - ( - - - string_or_placeholder_list - - ) - - - TABLE - - - table_name - - FROM - - - import_format - - - string_or_placeholder - - CREATE - - - USING - - - string_or_placeholder - - ( - - - table_elem_list - - ) - - - import_format - - DATA - - - ( - - - string_or_placeholder_list - - ) - - - opt_with_options - -

referenced by: + string_or_placeholder + + TABLE + + + table_name + + FROM + + + import_format + + + string_or_placeholder + + CREATE + + + USING + + + string_or_placeholder + + ( + + + table_elem_list + + ) + + + import_format + + DATA + + + ( + + + string_or_placeholder_list + + ) + + + INTO + + + table_name + + ( + + + insert_column_list + + ) + + + import_format + + DATA + + + ( + + + string_or_placeholder_list + + ) + + + opt_with_options + +

referenced by:

@@ -759,7 +730,7 @@

-


restore_stmt:

+


restore_stmt:

@@ -770,18 +741,18 @@ targets - FROM - - - string_or_placeholder_list - - - as_of_clause - - - opt_with_options - -

referenced by: + FROM + + + partitioned_backup_list + + + as_of_clause + + + opt_with_options + +

referenced by:

@@ -808,6 +779,35 @@

+


export_stmt:

+ + + + + + EXPORT + + + INTO + + + import_format + + + string_or_placeholder + + + opt_with_options + + FROM + + + select_stmt + +

referenced by: +


scrub_stmt:

@@ -851,6 +851,7 @@
  • preparable_stmt
  • resume_stmt
  • row_source_extension_stmt
  • +
  • show_jobs_stmt

  • preparable_set_stmt:

    @@ -870,7 +871,7 @@

    -


    show_stmt:

    +


    show_stmt:

    @@ -897,46 +898,49 @@ show_grants_stmt - show_indexes_stmt - - - show_jobs_stmt - - - show_queries_stmt - - - show_ranges_stmt - - - show_roles_stmt - - - show_schemas_stmt - - - show_sequences_stmt - - - show_session_stmt - - - show_sessions_stmt - - - show_stats_stmt - - - show_tables_stmt - - - show_trace_stmt - - - show_users_stmt - - - show_zone_stmt + show_indexes_stmt + + + show_partitions_stmt + + + show_jobs_stmt + + + show_queries_stmt + + + show_ranges_stmt + + + show_roles_stmt + + + show_schemas_stmt + + + show_sequences_stmt + + + show_session_stmt + + + show_sessions_stmt + + + show_stats_stmt + + + show_tables_stmt + + + show_trace_stmt + + + show_users_stmt + + + show_zone_stmt

    referenced by:


    comment_text:

    @@ -1218,74 +1227,6 @@
  • var_name
  • window_name
  • -


    import_format:

    - - - - - - name - -

    referenced by: -

    -


    string_or_placeholder:

    - - - - - - non_reserved_word_or_sconst - - PLACEHOLDER - - -

    referenced by: -

    -


    opt_with_options:

    - - - - - - WITH - - - kv_option_list - - OPTIONS - - - ( - - - kv_option_list - - ) - - -

    referenced by: -


    privileges:

    @@ -1555,6 +1496,27 @@

    +


    partitioned_backup:

    + + + + + + string_or_placeholder + + ( + + + string_or_placeholder_list + + ) + + +

    referenced by: +


    opt_as_of_clause:

    @@ -1588,6 +1550,36 @@

    +


    opt_with_options:

    + + + + + + WITH + + + kv_option_list + + OPTIONS + + + ( + + + kv_option_list + + ) + + +

    referenced by: +


    cancel_jobs_stmt:

    @@ -1856,6 +1848,7 @@

    referenced by:


    table_elem_list:

    @@ -2113,7 +2144,7 @@

    -


    a_expr:

    +


    a_expr:

    @@ -2151,200 +2182,203 @@ COLLATE - collation_name - - + - - - a_expr - - - - - - a_expr - - * - - - a_expr + collation_name + + AT + + + TIME + + + ZONE + + + a_expr + + + + + + a_expr + + - + + + a_expr - / + * - a_expr - - FLOORDIV - - - a_expr - - % - - - a_expr - - ^ - - - a_expr + a_expr + + / + + + a_expr + + FLOORDIV + + + a_expr + + % + + + a_expr - # + ^ a_expr - & + # - a_expr - - | - - - a_expr - - < - - - a_expr + a_expr + + & + + + a_expr + + | + + + a_expr - > + < - a_expr - - ? - - - a_expr - - JSON_SOME_EXISTS - - - a_expr - - JSON_ALL_EXISTS - - - a_expr - - CONTAINS - - - a_expr - - CONTAINED_BY - - - a_expr - - = - - - a_expr - - CONCAT - - - a_expr - - LSHIFT - - - a_expr + a_expr + + > + + + a_expr + + ? + + + a_expr + + JSON_SOME_EXISTS + + + a_expr + + JSON_ALL_EXISTS + + + a_expr + + CONTAINS + + + a_expr + + CONTAINED_BY + + + a_expr + + = + + + a_expr + + CONCAT + + + a_expr - RSHIFT + LSHIFT - a_expr - - FETCHVAL - - - a_expr - - FETCHTEXT - - - a_expr - - FETCHVAL_PATH - - - a_expr - - FETCHTEXT_PATH - - - a_expr - - REMOVE_PATH - - - a_expr - - INET_CONTAINED_BY_OR_EQUALS - - - a_expr - - INET_CONTAINS_OR_CONTAINED_BY - - - a_expr - - INET_CONTAINS_OR_EQUALS - - - a_expr - - LESS_EQUALS - - - a_expr - - GREATER_EQUALS - - - a_expr - - NOT_EQUALS - - - a_expr - - AND - - - a_expr - - OR - - - a_expr - - LIKE - - - a_expr + a_expr + + RSHIFT + + + a_expr + + FETCHVAL + + + a_expr + + FETCHTEXT + + + a_expr + + FETCHVAL_PATH + + + a_expr + + FETCHTEXT_PATH + + + a_expr + + REMOVE_PATH + + + a_expr + + INET_CONTAINED_BY_OR_EQUALS + + + a_expr + + INET_CONTAINS_OR_CONTAINED_BY + + + a_expr + + INET_CONTAINS_OR_EQUALS + + + a_expr + + LESS_EQUALS + + + a_expr + + GREATER_EQUALS + + + a_expr + + NOT_EQUALS + + + a_expr + + AND + + + a_expr + + OR + + + a_expr LIKE - a_expr - - ESCAPE - - - a_expr - - NOT - - - LIKE - - - a_expr + a_expr + + LIKE + + + a_expr + + ESCAPE + + + a_expr NOT @@ -2352,35 +2386,35 @@ LIKE - a_expr - - ESCAPE - - - a_expr - - ILIKE - - - a_expr + a_expr + + NOT + + + LIKE + + + a_expr + + ESCAPE + + + a_expr ILIKE - a_expr - - ESCAPE - - - a_expr - - NOT - - - ILIKE - - - a_expr + a_expr + + ILIKE + + + a_expr + + ESCAPE + + + a_expr NOT @@ -2388,20 +2422,20 @@ ILIKE - a_expr - - ESCAPE - - - a_expr - - SIMILAR - - - TO - - - a_expr + a_expr + + NOT + + + ILIKE + + + a_expr + + ESCAPE + + + a_expr SIMILAR @@ -2409,23 +2443,20 @@ TO - a_expr - - ESCAPE - - - a_expr - - NOT - - - SIMILAR - - - TO - - - a_expr + a_expr + + SIMILAR + + + TO + + + a_expr + + ESCAPE + + + a_expr NOT @@ -2436,254 +2467,267 @@ TO - a_expr - - ESCAPE - - - a_expr - - ~ - - - a_expr - - NOT_REGMATCH - - - a_expr - - REGIMATCH - - - a_expr - - NOT_REGIMATCH - - - a_expr - - IS - - - NAN - + a_expr + + NOT + + + SIMILAR + + + TO + + + a_expr + + ESCAPE + + + a_expr + + ~ + + + a_expr + + NOT_REGMATCH + + + a_expr + + REGIMATCH + + + a_expr + + NOT_REGIMATCH + + + a_expr IS - - - NOT - - - NAN + + + NAN IS - - - NULL - - - ISNULL - - - IS - - - NOT - - - NULL - - - NOTNULL - - - IS - - - TRUE + + + NOT + + + NAN + + + IS + + + NULL + + + ISNULL + + + IS + + + NOT + + + NULL + + + NOTNULL IS - - - NOT - - - TRUE + + + TRUE IS - - - FALSE + + + NOT + + + TRUE IS - - - NOT - - - FALSE + + + FALSE IS - - - UNKNOWN + + + NOT + + + FALSE IS - - - NOT - - - UNKNOWN + + + UNKNOWN IS - - - DISTINCT - - - FROM - - - a_expr + + + NOT + + + UNKNOWN + IS - - - NOT - - - DISTINCT - - - FROM - - - a_expr + + + DISTINCT + + + FROM + + + a_expr IS - - - OF - - - ( - - - type_list - - ) - + + + NOT + + + DISTINCT + + + FROM + + + a_expr IS - - - NOT - - - OF - - - ( - - - type_list - - ) - - - BETWEEN - - - opt_asymmetric - - - b_expr - - AND - - - a_expr - - NOT - - - BETWEEN - - - opt_asymmetric - - - b_expr - - AND - - - a_expr - - BETWEEN - - - SYMMETRIC - - - b_expr - - AND - - - a_expr - - NOT - - - BETWEEN - - - SYMMETRIC - - - b_expr - - AND - - - a_expr - - IN - - - in_expr - - NOT - - - IN - - - in_expr - - - subquery_op - - - sub_type - - - a_expr + + + OF + + + ( + + + type_list + + ) + + + IS + + + NOT + + + OF + + + ( + + + type_list + + ) + + + BETWEEN + + + opt_asymmetric + + + b_expr + + AND + + + a_expr + + NOT + + + BETWEEN + + + opt_asymmetric + + + b_expr + + AND + + + a_expr + + BETWEEN + + + SYMMETRIC + + + b_expr + + AND + + + a_expr + + NOT + + + BETWEEN + + + SYMMETRIC + + + b_expr + + AND + + + a_expr + + IN + + + in_expr + + NOT + + + IN + + + in_expr + + + subquery_op + + + sub_type + + + a_expr

    referenced by:

    -


    db_object_name:

    +


    opt_from_list:

    + + + + + + FROM + + + from_list + +

    referenced by: +

    +


    db_object_name:

    @@ -3648,7 +3789,7 @@
  • tuple1_unambiguous_values
  • values_clause
  • -


    unreserved_keyword:

    +


    unreserved_keyword:

    @@ -3730,673 +3871,676 @@ COMPACT - - - CONFLICT - - - CONFIGURATION - - - CONFIGURATIONS - - - CONFIGURE - - - CONSTRAINTS - - - CONVERSION - - - COPY - - - COVERING - - - CUBE - - - CURRENT - - - CYCLE - - - DATA - - - DATABASE - - - DATABASES - - - DATE - - - DAY - - - DEALLOCATE - - - DELETE - - - DEFERRED - - - DISCARD - - - DOMAIN - - - DOUBLE - - - DROP - - - ENCODING - - - ENUM - - - ESCAPE - - - EXECUTE - - - EXPERIMENTAL - - - EXPERIMENTAL_AUDIT - - - EXPERIMENTAL_FINGERPRINTS - - - EXPERIMENTAL_RANGES + + + COMPLETE + + + CONFLICT + + + CONFIGURATION + + + CONFIGURATIONS + + + CONFIGURE + + + CONSTRAINTS + + + CONVERSION + + + COPY + + + COVERING + + + CUBE + + + CURRENT + + + CYCLE + + + DATA + + + DATABASE + + + DATABASES + + + DATE + + + DAY + + + DEALLOCATE + + + DELETE + + + DEFERRED + + + DISCARD + + + DOMAIN + + + DOUBLE + + + DROP + + + ENCODING + + + ENUM + + + ESCAPE + + + EXECUTE + + + EXPERIMENTAL + + + EXPERIMENTAL_AUDIT + + + EXPERIMENTAL_FINGERPRINTS EXPERIMENTAL_RELOCATE EXPERIMENTAL_REPLICA - - - EXPLAIN - - - EXPORT - - - EXTENSION - - - FILES - - - FILTER - - - FIRST - - - FLOAT4 + + + EXPIRATION + + + EXPLAIN + + + EXPORT + + + EXTENSION + + + FILES + + + FILTER + + + FIRST - FLOAT8 - - - FOLLOWING - - - FORCE_INDEX - - - FUNCTION - - - GLOBAL - - - GRANTS - - - GROUPS - - - HASH - - - HIGH - - - HISTOGRAM - - - HOUR - - - IMMEDIATE - - - IMPORT - - - INCREMENT - - - INCREMENTAL - - - INDEXES - - - INET - - - INJECT - - - INSERT - - - INT2 - - - INT2VECTOR - - - INT4 + FLOAT4 + + + FLOAT8 + + + FOLLOWING + + + FORCE_INDEX + + + FUNCTION + + + GLOBAL + + + GRANTS + + + GROUPS + + + HASH + + + HIGH + + + HISTOGRAM + + + HOUR + + + IMMEDIATE + + + IMPORT + + + INCREMENT + + + INCREMENTAL + + + INDEXES + + + INET + + + INJECT + + + INSERT + + + INT2 + + + INT2VECTOR - INT8 - - - INT64 - - - INTERLEAVE - - - INVERTED - - - ISOLATION - - - JOB - - - JOBS + INT4 + + + INT8 + + + INT64 + + + INTERLEAVE + + + INVERTED + + + ISOLATION + + + JOB - JSON - - - JSONB - - - KEY - - - KEYS - - - KV - - - LANGUAGE - - - LC_COLLATE - - - LC_CTYPE - - - LEASE - - - LESS - - - LEVEL - - - LIST - - - LOCAL - - - LOOKUP - - - LOW - - - MATCH - - - MATERIALIZED - - - MAXVALUE - - - MERGE - - - MINUTE - - - MINVALUE - - - MONTH - - - NAMES - - - NAN - - - NAME - - - NEXT - - - NO - - - NORMAL - - - NO_INDEX_JOIN - - - IGNORE_FOREIGN_KEYS - - - OF - - - OFF + JOBS + + + JSON + + + JSONB + + + KEY + + + KEYS + + + KV + + + LANGUAGE + + + LC_COLLATE + + + LC_CTYPE + + + LEASE + + + LESS + + + LEVEL + + + LIST + + + LOCAL + + + LOOKUP + + + LOW + + + MATCH + + + MATERIALIZED + + + MAXVALUE + + + MERGE + + + MINUTE + + + MINVALUE + + + MONTH + + + NAMES + + + NAN + + + NAME + + + NEXT + + + NO + + + NORMAL + + + NO_INDEX_JOIN + + + IGNORE_FOREIGN_KEYS + + + OF - OID - - - OIDS - - - OIDVECTOR - - - OPERATOR - - - OPT - - - OPTION - - - OPTIONS - - - ORDINALITY - - - OVER - - - OWNED - - - PARENT - - - PARTIAL - - - PARTITION - - - PASSWORD - - - PAUSE - - - PHYSICAL - - - PLAN - - - PLANS - - - PRECEDING - - - PREPARE - - - PRIORITY - - - PUBLICATION - - - QUERIES - - - QUERY - - - RANGE - - - RANGES - - - READ - - - RECURSIVE - - - REF - - - REGCLASS - - - REGPROC - - - REGPROCEDURE - - - REGNAMESPACE - - - REGTYPE - - - RELEASE - - - RENAME - - - REPEATABLE - - - REPLACE - - - RESET - - - RESTORE - - - RESTRICT - - - RESUME - - - REVOKE - - - ROLE - - - ROLES - - - ROLLBACK - - - ROLLUP - - - ROWS - - - RULE - - - SETTING - - - SETTINGS - - - STATUS - - - SAVEPOINT - - - SCATTER - - - SCHEMA - - - SCHEMAS - - - SCRUB - - - SEARCH - - - SECOND - - - SERIAL - - - SERIALIZABLE - - - SERIAL2 - - - SERIAL4 + OFF + + + OID + + + OIDS + + + OIDVECTOR + + + OPERATOR + + + OPT + + + OPTION + + + OPTIONS + + + ORDINALITY + + + OVER + + + OWNED + + + PARENT + + + PARTIAL + + + PARTITION + + + PARTITIONS + + + PASSWORD + + + PAUSE + + + PHYSICAL + + + PLAN + + + PLANS + + + PRECEDING + + + PREPARE + + + PRIORITY + + + PUBLICATION + + + QUERIES + + + QUERY + + + RANGE + + + RANGES + + + READ + + + RECURSIVE + + + REF + + + REGCLASS + + + REGPROC + + + REGPROCEDURE + + + REGNAMESPACE + + + REGTYPE + + + RELEASE + + + RENAME + + + REPEATABLE + + + REPLACE + + + RESET + + + RESTORE + + + RESTRICT + + + RESUME + + + REVOKE + + + ROLE + + + ROLES + + + ROLLBACK + + + ROLLUP + + + ROWS + + + RULE + + + SETTING + + + SETTINGS + + + STATUS + + + SAVEPOINT + + + SCATTER + + + SCHEMA + + + SCHEMAS + + + SCRUB + + + SEARCH + + + SECOND + + + SERIAL + + + SERIALIZABLE - SERIAL8 - - - SERVER - - - SEQUENCE - - - SEQUENCES - - - SESSION - - - SESSIONS - - - SET - - - SHOW - - - SIMPLE - - - SMALLSERIAL - - - SNAPSHOT - - - SQL - - - START - - - STATISTICS + SERIAL2 + + + SERIAL4 + + + SERIAL8 + + + SERVER + + + SEQUENCE + + + SEQUENCES + + + SESSION + + + SESSIONS + + + SET + + + SHOW + + + SIMPLE + + + SMALLSERIAL + + + SNAPSHOT + + + SQL - STDIN - - - STORE - - - STORED - - - STORING - - - STRICT - - - STRING - - - SPLIT - - - SUBSCRIPTION - - - SYNTAX - - - SYSTEM - - - TABLES - - - TEMP - - - TEMPLATE - - - TEMPORARY - - - TESTING_RANGES - - - TESTING_RELOCATE - - - TEXT - - - TRACE - - - TRANSACTION - - - TRIGGER - - - TRUNCATE - - - TRUSTED - - - TYPE - - - THROTTLING + START + + + STATISTICS + + + STDIN + + + STORE + + + STORED + + + STORING + + + STRICT + + + STRING + + + SPLIT + + + SUBSCRIPTION + + + SYNTAX + + + SYSTEM + + + TABLES + + + TEMP + + + TEMPLATE + + + TEMPORARY + + + TESTING_RELOCATE + + + TEXT + + + TRACE + + + TRANSACTION + + + TRIGGER + + + TRUNCATE + + + TRUSTED + + + TYPE - UNBOUNDED - - - UNCOMMITTED - - - UNKNOWN - - - UNLOGGED - - - UNSPLIT - - - UPDATE + THROTTLING + + + UNBOUNDED + + + UNCOMMITTED + + + UNKNOWN + + + UNLOGGED + + + UNSPLIT - UPSERT - - - UUID - - - USE - - - USERS - - - VALID - - - VALIDATE - - - VALUE - - - VARYING - - - VIEW - - - WITHIN - - - WITHOUT - - - WRITE - - - YEAR - - - ZONE - + UPDATE + + + UPSERT + + + UUID + + + USE + + + USERS + + + VALID + + + VALIDATE + + + VALUE + + + VARYING + + + VIEW + + + WITHIN + + + WITHOUT + + + WRITE + + + YEAR + + + ZONE +

    referenced by:

    -


    non_reserved_word_or_sconst:

    - - - - - - non_reserved_word - - SCONST - - -

    referenced by: -

    -


    kv_option_list:

    - - - - - - kv_option - - , - - -

    referenced by: -


    complex_table_pattern:

    @@ -4904,6 +5014,21 @@

    +


    kv_option_list:

    + + + + + + kv_option + + , + + +

    referenced by: +


    opt_password:

    @@ -5109,7 +5234,7 @@

    -


    create_table_as_stmt:

    +


    create_table_as_stmt:

    @@ -5130,17 +5255,17 @@ EXISTS - table_name - - - opt_column_list - - AS - - - select_stmt - -

    referenced by: + table_name + + + create_as_opt_col_list + + AS + + + select_stmt + +

    referenced by:

    @@ -5509,6 +5634,25 @@

    +


    non_reserved_word_or_sconst:

    + + + + + + non_reserved_word + + SCONST + + +

    referenced by: +


    table_elem:

    @@ -6051,52 +6195,6 @@

    -


    opt_automatic:

    - - - - - - AUTOMATIC - - -

    referenced by: -

    -


    opt_cluster:

    - - - - - - CLUSTER - - - LOCAL - - -

    referenced by: -

    -


    ranges_kw:

    - - - - - - TESTING_RANGES - - - EXPERIMENTAL_RANGES - - -

    referenced by: -


    table_index_name:

    @@ -6121,10 +6219,28 @@
  • alter_split_index_stmt
  • alter_unsplit_index_stmt
  • alter_zone_index_stmt
  • +
  • show_partitions_stmt
  • show_ranges_stmt
  • show_zone_stmt
  • table_index_name_list
  • +


    opt_cluster:

    + + + + + + CLUSTER + + + LOCAL + + +

    referenced by: +


    opt_compact:

    @@ -6226,6 +6342,22 @@

    +


    from_list:

    + + + + + + table_ref + + , + + +

    referenced by: +


    simple_db_object_name:

    @@ -6317,48 +6449,6 @@
  • target_name
  • zone_name
  • -


    non_reserved_word:

    - - - - - - identifier - - - unreserved_keyword - - - col_name_keyword - - - type_func_name_keyword - -

    referenced by: -

    -


    kv_option:

    - - - - - - name - - SCONST - - - = - - - string_or_placeholder - -

    referenced by: -


    transaction_mode:

    @@ -6417,7 +6507,7 @@

    -


    alter_split_stmt:

    +


    alter_split_stmt:

    @@ -6437,13 +6527,21 @@ AT - select_stmt - -

    referenced by: + select_stmt + + WITH + + + EXPIRATION + + + a_expr + +

    referenced by:

    -


    alter_unsplit_stmt:

    +


    alter_unsplit_stmt:

    @@ -6458,14 +6556,17 @@ table_name UNSPLIT - - - AT - - - select_stmt - -

    referenced by: + + + AT + + + select_stmt + + ALL + + +

    referenced by:

    @@ -6600,7 +6701,7 @@

    -


    alter_split_index_stmt:

    +


    alter_split_index_stmt:

    @@ -6620,13 +6721,21 @@ AT - select_stmt - -

    referenced by: + select_stmt + + WITH + + + EXPIRATION + + + a_expr + +

    referenced by:

    -


    alter_unsplit_index_stmt:

    +


    alter_unsplit_index_stmt:

    @@ -6641,14 +6750,17 @@ table_index_name UNSPLIT - - - AT - - - select_stmt - -

    referenced by: + + + AT + + + select_stmt + + ALL + + +

    referenced by:

    @@ -6915,6 +7027,26 @@

    +


    kv_option:

    + + + + + + name + + SCONST + + + = + + + string_or_placeholder + +

    referenced by: +


    opt_with:

    @@ -7189,6 +7321,24 @@

    +


    create_as_opt_col_list:

    + + + + + + ( + + + create_as_table_defs + + ) + + +

    referenced by: +


    view_name:

    @@ -7414,6 +7564,28 @@
  • drop_table_stmt
  • drop_view_stmt
  • +


    non_reserved_word:

    + + + + + + identifier + + + unreserved_keyword + + + col_name_keyword + + + type_func_name_keyword + +

    referenced by: +


    column_def:

    @@ -7504,6 +7676,7 @@

    referenced by:


    table_constraint:

    @@ -7537,6 +7710,8 @@

    @@ -8070,10 +8245,64 @@

    -


    cockroachdb_extra_reserved_keyword:

    +


    table_ref:

    - + + + + relation_expr + + + opt_index_flags + + LATERAL + + + select_with_parens + + + func_table + + [ + + + row_source_extension_stmt + + ] + + + opt_ordinality + + + opt_alias_clause + + + joined_table + + ( + + + joined_table + + ) + + + opt_ordinality + + + alias_clause + +

    referenced by: +

    +


    cockroachdb_extra_reserved_keyword:

    + + + INDEX @@ -8633,6 +8862,35 @@
  • alter_table_cmd
  • opt_partition_by
  • +


    create_as_table_defs:

    + + + + + + column_name + + + create_as_col_qual_list + + , + + + column_name + + + create_as_col_qual_list + + + family_def + + + create_as_constraint_def + +

    referenced by: +


    common_table_expr:

    @@ -9336,60 +9594,6 @@

    -


    table_ref:

    - - - - - - relation_expr - - - opt_index_flags - - LATERAL - - - select_with_parens - - - func_table - - [ - - - row_source_extension_stmt - - ] - - - opt_ordinality - - - opt_alias_clause - - - joined_table - - ( - - - joined_table - - ) - - - opt_ordinality - - - alias_clause - -

    referenced by: -


    all_or_distinct:

    @@ -9421,82 +9625,238 @@

    -


    user_priority:

    +


    opt_ordinality:

    + + + + + + WITH + + + ORDINALITY + + +

    referenced by: +

    +


    opt_alias_clause:

    + + + + + + alias_clause + +

    referenced by: +

    +


    joined_table:

    - - - LOW - - - NORMAL - - - HIGH - - -

    referenced by: + + + ( + + + joined_table + + ) + + + table_ref + + CROSS + + + opt_join_hint + + NATURAL + + + join_type + + + opt_join_hint + + JOIN + + + table_ref + + + join_type + + + opt_join_hint + + JOIN + + + table_ref + + + join_qual + +

    referenced by:

    -


    alter_table_cmd:

    +


    alias_clause:

    - - - RENAME - - - opt_column - - CONSTRAINT - - - column_name - - TO - - - column_name - - ADD - - - COLUMN - - - IF - - - NOT - - - EXISTS - - - column_def - - - table_constraint - - - opt_validate_behavior - - ALTER - - - opt_column - - - column_name - - - alter_column_default - - DROP - + + + AS + + + table_alias_name + + + opt_column_list + +

    referenced by: +

    +


    func_table:

    + + + + + + func_expr_windowless + + ROWS + + + FROM + + + ( + + + rowsfrom_list + + ) + + +

    referenced by: +

    +


    row_source_extension_stmt:

    + + + + + + delete_stmt + + + explain_stmt + + + insert_stmt + + + select_stmt + + + show_stmt + + + update_stmt + + + upsert_stmt + +

    referenced by: +

    +


    user_priority:

    + + + + + + LOW + + + NORMAL + + + HIGH + + +

    referenced by: +

    +


    alter_table_cmd:

    + + + + + + RENAME + + + opt_column + + CONSTRAINT + + + column_name + + TO + + + column_name + + ADD + + + COLUMN + + + IF + + + NOT + + + EXISTS + + + column_def + + + table_constraint + + + opt_validate_behavior + + ALTER + + + opt_column + + + column_name + + + alter_column_default + + DROP + NOT @@ -9504,67 +9864,76 @@ NULL - STORED - - - opt_set_data - - TYPE - - - typename - - - opt_collate - - - opt_alter_column_using - - DROP - - - opt_column - - IF - - - EXISTS - - - column_name - - CONSTRAINT - - - IF - - - EXISTS - - - constraint_name - - - opt_drop_behavior - - VALIDATE - - - CONSTRAINT - - - constraint_name - - EXPERIMENTAL_AUDIT - - - SET - - - audit_mode - - - partition_by + STORED + + + SET + + + NOT + + + NULL + + + opt_set_data + + TYPE + + + typename + + + opt_collate + + + opt_alter_column_using + + DROP + + + opt_column + + IF + + + EXISTS + + + column_name + + CONSTRAINT + + + IF + + + EXISTS + + + constraint_name + + + opt_drop_behavior + + VALIDATE + + + CONSTRAINT + + + constraint_name + + EXPERIMENTAL_AUDIT + + + SET + + + audit_mode + + + partition_by

    referenced by: