From 4cb9b3a434812f1f2afaa1403abee59de1c084a9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 15 Aug 2026 23:26:34 +0000 Subject: [PATCH] =?UTF-8?q?Milestone=204:=20expressions=20+=20SELECT=20?= =?UTF-8?q?=E2=80=94=20parser,=20JSON=20emitter,=20ParseToJSON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit internal/emit: JSON emitter with byte-parity to the pinned pg_query_outfuncs_json.c, driven by the protobuf descriptor (field order = C struct order, json_name = C field name) plus the reference's hand-written special cases. Validated by round-tripping all 42,970 corpus tree goldens byte-identically (TestGoldenRoundTrip). internal/parse: hand-written recursive-descent port of the pinned gram.y's expression and SELECT regions, one parse* method per production with attribution comments: - a_expr/b_expr/c_expr precedence climbing mirroring bison's resolution (left-assoc right-operand level, %nonassoc chain errors, %prec at the annotated sites, subquery_Op entry-vs-reduce precedence). - Constants and const typecasts (AexprConst incl. func_name Sconst/PARAM and ConstTypename/ConstInterval forms), the full Typename families. - func_expr: func_application (named args, VARIADIC, DISTINCT, agg star), WITHIN GROUP / FILTER / OVER, window specifications and frames, the func_expr_common_subexpr set (CAST/EXTRACT/OVERLAY/POSITION/SUBSTRING/ TRIM/TREAT/NULLIF/COALESCE/GREATEST/LEAST, SQL value functions, xml*, SQL/JSON constructors, query functions and aggregates, MERGE_ACTION). - SELECT end-to-end: target list with bare-label aliases, FROM with joins (bison-faithful nesting), LATERAL, function tables and ROWS FROM, TABLESAMPLE, XMLTABLE, JSON_TABLE (incl. NESTED paths), sub-selects, DISTINCT [ON], GROUP BY incl. grouping sets, HAVING, WINDOW, set operations, WITH/CTEs (MATERIALIZED, SEARCH/CYCLE), VALUES, ORDER BY, LIMIT/OFFSET/FETCH (WITH TIES), FOR locking clauses, SELECT INTO. - Grammar errors report through the C error stack's path (scanner_yyerror data, character cursor positions); gram.y action ereports carry their original funcname and positions. Parse/ParseToProtobuf/ParseToJSON are live; pg_query_go's ported parse tests now run for the implemented statement types. Corpus: 16,300+ parse cases harvested off the todo list. Remaining parse todos all start with or embed milestone-5-7 statement types. cmd/difftest ships the interim -summary/-show failure classifier that drove the milestone (mutation fuzzing arrives in milestone 12). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01543SdbotP1DX2XRMvfCHn5 --- PLAN.md | 58 +- cmd/difftest/main.go | 175 ++ compat_test.go | 6 +- internal/emit/emit.go | 324 ++++ internal/emit/roundtrip_test.go | 67 + internal/lexer/grammar_errors.go | 44 + internal/lexer/lexer.go | 3 + internal/parse/cexpr.go | 386 +++++ internal/parse/expr.go | 846 +++++++++ internal/parse/func.go | 1525 +++++++++++++++++ internal/parse/gram_support.go | 436 +++++ internal/parse/names.go | 174 ++ internal/parse/nodes.go | 237 +++ internal/parse/parser.go | 194 +++ internal/parse/select.go | 1291 ++++++++++++++ internal/parse/tablefuncs.go | 291 ++++ internal/parse/typename.go | 488 ++++++ parse_test.go | 15 + parser/parser.go | 14 +- .../advisory_lock.metadata.json | 17 +- .../postgres_regress/aggregates.metadata.json | 1 - .../collate.icu.utf8.metadata.json | 1 - .../collate.linux.utf8.metadata.json | 1 - .../postgres_regress/collate.metadata.json | 1 - .../collate.windows.win1252.metadata.json | 1 - .../postgres_regress/copyselect.metadata.json | 1 - .../postgres_regress/create_am.metadata.json | 1 - .../create_function_c.metadata.json | 1 - .../create_function_sql.metadata.json | 1 - .../create_operator.metadata.json | 1 - .../create_table.metadata.json | 1 - .../postgres_regress/domain.metadata.json | 3 - .../postgres_regress/errors.metadata.json | 1 - .../event_trigger_login.metadata.json | 1 - .../postgres_regress/insert.metadata.json | 1 - .../largeobject.metadata.json | 14 - .../postgres_regress/limit.metadata.json | 2 - .../misc_functions.metadata.json | 6 - .../postgres_regress/mvcc.metadata.json | 1 - .../postgres_regress/numerology.metadata.json | 4 +- .../postgres_regress/privileges.metadata.json | 1 - .../postgres_regress/psql.metadata.json | 16 +- .../psql_crosstab.metadata.json | 5 +- .../postgres_regress/reloptions.metadata.json | 3 - .../rowsecurity.metadata.json | 1 - .../postgres_regress/rules.metadata.json | 1 - .../postgres_regress/sqljson.metadata.json | 5 - .../sqljson_jsontable.metadata.json | 4 - .../postgres_regress/stats.metadata.json | 80 - .../postgres_regress/strings.metadata.json | 4 +- .../subscription.metadata.json | 1 - .../tablesample.metadata.json | 1 - .../postgres_regress/tablespace.metadata.json | 2 - .../transactions.metadata.json | 11 - .../postgres_regress/tsearch.metadata.json | 1 - .../postgres_regress/txid.metadata.json | 5 - .../postgres_regress/vacuum.metadata.json | 2 - .../postgres_regress/window.metadata.json | 2 - .../postgres_regress/xid.metadata.json | 5 - .../postgres_regress/xml.metadata.json | 1 - .../testdata/parse/deparse/case.metadata.json | 4 +- .../deparse/complex_depesz.metadata.json | 4 +- .../deparse/complex_gitlab.metadata.json | 4 +- .../parse/deparse/complex_mattm.metadata.json | 4 +- .../parse/deparse/simple.metadata.json | 4 +- .../parse/deparse/union_2.metadata.json | 4 +- .../08-selects_01-numbers.metadata.json | 4 +- .../08-selects_02-string.metadata.json | 4 +- .../08-selects_03-sql-functions.metadata.json | 4 +- .../08-selects_04-functions.metadata.json | 4 +- ...08-selects_06-column-aliases.metadata.json | 4 +- .../08-selects_07-casts.metadata.json | 4 +- ...8-selects_08-fields-in-table.metadata.json | 4 +- .../08-selects_09-operators.metadata.json | 4 +- .../08-selects_10-operators.metadata.json | 4 +- ...08-selects_11-weird-operator.metadata.json | 4 +- ...selects_12-boolean-operation.metadata.json | 4 +- .../08-selects_13-joins.metadata.json | 4 +- .../08-selects_14-star.metadata.json | 4 +- .../08-selects_15-where.metadata.json | 4 +- .../08-selects_16-groupby.metadata.json | 4 +- .../08-selects_17-orderby.metadata.json | 4 +- .../08-selects_18-limitoffset.metadata.json | 4 +- .../08-selects_19-having.metadata.json | 4 +- .../08-selects_20-case.metadata.json | 4 +- .../08-selects_21-in.metadata.json | 4 +- .../08-selects_22-subselect.metadata.json | 4 +- .../08-selects_23-null.metadata.json | 4 +- ...08-selects_24-range-function.metadata.json | 4 +- .../08-selects_25-coalesce.metadata.json | 4 +- ...8-selects_26-range-subselect.metadata.json | 4 +- .../08-selects_27-distinct.metadata.json | 4 +- .../08-selects_28-distinct-on.metadata.json | 4 +- .../08-selects_29-param-ref.metadata.json | 4 +- .../08-selects_30-array.metadata.json | 4 +- .../08-selects_31-indirection.metadata.json | 4 +- .../08-selects_32-collate.metadata.json | 4 +- ...-selects_33-window-functions.metadata.json | 4 +- ...-selects_34-framed-functions.metadata.json | 4 +- .../08-selects_35-setops.metadata.json | 4 +- .../08-selects_36-values.metadata.json | 4 +- .../08-selects_37-cte.metadata.json | 4 +- .../08-selects_38-rcte.metadata.json | 4 +- .../08-selects_39-any.metadata.json | 4 +- .../08-selects_40-all.metadata.json | 4 +- ...08-selects_41-special-a-expr.metadata.json | 4 +- .../08-selects_42-minimax.metadata.json | 4 +- .../08-selects_43-rowexpr.metadata.json | 4 +- .../08-selects_44-bitstring.metadata.json | 4 +- .../08-selects_45-grouping-sets.metadata.json | 4 +- .../08-selects_46-cube.metadata.json | 4 +- .../08-selects_47-rollup.metadata.json | 4 +- ...8-selects_48-sublink-any-all.metadata.json | 4 +- ...elects_49-variadic-func-call.metadata.json | 4 +- .../13-tablesample_01-system.metadata.json | 4 +- .../13-tablesample_02-bernoulli.metadata.json | 4 +- ...13-tablesample_03-repeatable.metadata.json | 4 +- .../14-xml_01-simple.metadata.json | 4 +- .../14-xml_02-concat.metadata.json | 4 +- .../14-xml_03-forest.metadata.json | 4 +- .../14-xml_04-parse.metadata.json | 4 +- .../deparse_depesz/14-xml_05-pi.metadata.json | 4 +- .../14-xml_06-root.metadata.json | 4 +- .../14-xml_07-serialize.metadata.json | 4 +- .../14-xml_08-is-document.metadata.json | 4 +- .../16-bugs_01-lateral.metadata.json | 4 +- .../16-bugs_02-current-row.metadata.json | 4 +- ...-bugs_03-filtered-aggregates.metadata.json | 4 +- ...6-bugs_04-cast-of-expression.metadata.json | 4 +- .../16-bugs_05-literal-new-line.metadata.json | 4 +- ...aggregate-filter-inside-case.metadata.json | 4 +- ...sing-ordinality-and-order-by.metadata.json | 4 +- ..._08-missing-dot-before-start.metadata.json | 4 +- ...09-missing-dot-before-column.metadata.json | 4 +- .../16-bugs_10-missing-not.metadata.json | 4 +- ...6-bugs_11-distinct-aggregate.metadata.json | 4 +- ...ocking-selects_01-for-update.metadata.json | 4 +- ...selects_02-for-no-key-update.metadata.json | 4 +- ...locking-selects_03-for-share.metadata.json | 4 +- ...ing-selects_04-for-key-share.metadata.json | 4 +- ...-locking-selects_05-of-table.metadata.json | 4 +- ...locking-selects_06-of-tables.metadata.json | 4 +- ...17-locking-selects_07-nowait.metadata.json | 4 +- ...cking-selects_08-skip-locked.metadata.json | 4 +- .../17-locking-selects_09-multi.metadata.json | 4 +- .../testdata/parse/libpg_query.metadata.json | 24 +- .../advisory_lock.metadata.json | 32 +- .../postgres_regress/aggregates.metadata.json | 276 --- .../alter_generic.metadata.json | 13 - .../alter_operator.metadata.json | 14 - .../alter_table.metadata.json | 145 -- .../postgres_regress/amutils.metadata.json | 9 +- .../postgres_regress/arrays.metadata.json | 357 +--- .../postgres_regress/async.metadata.json | 9 +- .../parse/postgres_regress/bit.metadata.json | 98 +- .../postgres_regress/bitmapops.metadata.json | 2 - .../postgres_regress/boolean.metadata.json | 77 - .../parse/postgres_regress/box.metadata.json | 51 +- .../parse/postgres_regress/brin.metadata.json | 17 - .../postgres_regress/brin_bloom.metadata.json | 14 - .../postgres_regress/brin_multi.metadata.json | 66 - .../btree_index.metadata.json | 25 - .../parse/postgres_regress/case.metadata.json | 28 - .../parse/postgres_regress/char.metadata.json | 23 +- .../postgres_regress/circle.metadata.json | 9 +- .../postgres_regress/cluster.metadata.json | 28 - .../collate.icu.utf8.metadata.json | 236 --- .../collate.linux.utf8.metadata.json | 118 -- .../postgres_regress/collate.metadata.json | 72 - .../collate.utf8.metadata.json | 18 +- .../collate.windows.win1252.metadata.json | 92 - .../postgres_regress/combocid.metadata.json | 13 - .../postgres_regress/comments.metadata.json | 9 +- .../compression.metadata.json | 28 - .../constraints.metadata.json | 33 - .../postgres_regress/conversion.metadata.json | 35 +- .../parse/postgres_regress/copy.metadata.json | 9 - .../postgres_regress/copyselect.metadata.json | 1 - .../create_aggregate.metadata.json | 3 - .../postgres_regress/create_am.metadata.json | 35 - .../create_cast.metadata.json | 11 +- .../create_function_c.metadata.json | 1 - .../create_function_sql.metadata.json | 47 - .../create_index.metadata.json | 165 -- .../create_index_spgist.metadata.json | 96 -- .../create_misc.metadata.json | 16 +- .../create_operator.metadata.json | 11 - .../create_procedure.metadata.json | 8 - .../create_table.metadata.json | 15 - .../create_table_like.metadata.json | 20 - .../create_type.metadata.json | 19 - .../create_view.metadata.json | 97 -- .../parse/postgres_regress/date.metadata.json | 249 +-- .../postgres_regress/dbsize.metadata.json | 28 +- .../postgres_regress/delete.metadata.json | 2 - .../postgres_regress/dependency.metadata.json | 2 - .../postgres_regress/domain.metadata.json | 78 +- .../drop_operator.metadata.json | 4 - .../parse/postgres_regress/enum.metadata.json | 70 +- .../postgres_regress/errors.metadata.json | 21 - .../event_trigger.metadata.json | 6 - .../event_trigger_login.metadata.json | 3 - .../postgres_regress/explain.metadata.json | 28 +- .../expressions.metadata.json | 38 - .../fast_default.metadata.json | 53 +- .../postgres_regress/float4.metadata.json | 64 - .../postgres_regress/float8.metadata.json | 137 -- .../foreign_data.metadata.json | 38 +- .../foreign_key.metadata.json | 90 - .../functional_deps.metadata.json | 15 - .../postgres_regress/generated.metadata.json | 25 - .../postgres_regress/geometry.metadata.json | 159 +- .../parse/postgres_regress/gin.metadata.json | 15 - .../parse/postgres_regress/gist.metadata.json | 12 - .../groupingsets.metadata.json | 98 +- .../parse/postgres_regress/guc.metadata.json | 64 - .../postgres_regress/hash_func.metadata.json | 39 +- .../postgres_regress/hash_index.metadata.json | 16 - .../postgres_regress/hash_part.metadata.json | 19 - .../postgres_regress/horology.metadata.json | 352 ---- .../postgres_regress/identity.metadata.json | 45 +- .../incremental_sort.metadata.json | 25 - .../index_including.metadata.json | 29 - .../index_including_gist.metadata.json | 8 - .../postgres_regress/indexing.metadata.json | 48 - .../indirect_toast.metadata.json | 5 - .../parse/postgres_regress/inet.metadata.json | 71 +- .../infinite_recurse.metadata.json | 4 +- .../postgres_regress/inherit.metadata.json | 82 - .../postgres_regress/init_privs.metadata.json | 1 - .../postgres_regress/insert.metadata.json | 22 - .../insert_conflict.metadata.json | 16 - .../parse/postgres_regress/int2.metadata.json | 70 +- .../parse/postgres_regress/int4.metadata.json | 88 +- .../parse/postgres_regress/int8.metadata.json | 162 +- .../postgres_regress/interval.metadata.json | 396 +---- .../parse/postgres_regress/join.metadata.json | 209 --- .../postgres_regress/join_hash.metadata.json | 47 - .../parse/postgres_regress/json.metadata.json | 428 +---- .../json_encoding.metadata.json | 47 +- .../postgres_regress/jsonb.metadata.json | 911 ---------- .../jsonb_jsonpath.metadata.json | 811 +-------- .../postgres_regress/jsonpath.metadata.json | 227 +-- .../jsonpath_encoding.metadata.json | 35 +- .../largeobject.metadata.json | 71 - .../postgres_regress/limit.metadata.json | 27 - .../parse/postgres_regress/line.metadata.json | 14 +- .../parse/postgres_regress/lock.metadata.json | 11 +- .../parse/postgres_regress/lseg.metadata.json | 5 +- .../postgres_regress/macaddr.metadata.json | 19 +- .../postgres_regress/macaddr8.metadata.json | 48 +- .../maintain_every.metadata.json | 2 - .../postgres_regress/matview.metadata.json | 31 - .../parse/postgres_regress/md5.metadata.json | 17 +- .../postgres_regress/memoize.metadata.json | 16 - .../postgres_regress/merge.metadata.json | 101 -- .../parse/postgres_regress/misc.metadata.json | 30 +- .../misc_functions.metadata.json | 95 - .../misc_sanity.metadata.json | 8 +- .../postgres_regress/money.metadata.json | 97 +- .../multirangetypes.metadata.json | 490 ------ .../parse/postgres_regress/mvcc.metadata.json | 2 - .../parse/postgres_regress/name.metadata.json | 32 +- .../postgres_regress/namespace.metadata.json | 6 - .../postgres_regress/numeric.metadata.json | 391 ----- .../numeric_big.metadata.json | 32 +- .../postgres_regress/numerology.metadata.json | 4 +- .../object_address.metadata.json | 38 +- .../parse/postgres_regress/oid.metadata.json | 17 - .../postgres_regress/opr_sanity.metadata.json | 133 +- .../partition_aggregate.metadata.json | 34 +- .../partition_info.metadata.json | 43 - .../partition_join.metadata.json | 84 - .../partition_prune.metadata.json | 50 - .../postgres_regress/password.metadata.json | 8 +- .../parse/postgres_regress/path.metadata.json | 10 +- .../postgres_regress/pg_lsn.metadata.json | 23 +- .../postgres_regress/plancache.metadata.json | 15 - .../postgres_regress/plpgsql.metadata.json | 240 --- .../postgres_regress/point.metadata.json | 26 +- .../postgres_regress/polygon.metadata.json | 20 +- .../polymorphism.metadata.json | 220 --- .../postgres_regress/portals.metadata.json | 35 - .../postgres_regress/predicate.metadata.json | 2 - .../postgres_regress/prepare.metadata.json | 11 +- .../prepared_xacts.metadata.json | 26 - .../postgres_regress/privileges.metadata.json | 76 - .../parse/postgres_regress/psql.metadata.json | 40 +- .../psql_crosstab.metadata.json | 6 +- .../publication.metadata.json | 9 - .../postgres_regress/random.metadata.json | 44 +- .../postgres_regress/rangefuncs.metadata.json | 223 +-- .../postgres_regress/rangetypes.metadata.json | 254 --- .../postgres_regress/regex.metadata.json | 97 +- .../postgres_regress/regproc.metadata.json | 105 +- .../postgres_regress/reloptions.metadata.json | 22 +- .../replica_identity.metadata.json | 11 - .../postgres_regress/returning.metadata.json | 26 - .../roleattributes.metadata.json | 32 - .../rowsecurity.metadata.json | 119 -- .../postgres_regress/rowtypes.metadata.json | 155 -- .../postgres_regress/rules.metadata.json | 130 -- .../sanity_check.metadata.json | 4 +- .../postgres_regress/select.metadata.json | 52 - .../select_distinct.metadata.json | 26 +- .../select_distinct_on.metadata.json | 5 - .../select_having.metadata.json | 11 - .../select_implicit.metadata.json | 28 - .../select_into.metadata.json | 9 - .../select_parallel.metadata.json | 36 - .../select_views.metadata.json | 11 - .../postgres_regress/sequence.metadata.json | 89 - .../postgres_regress/spgist.metadata.json | 2 - .../postgres_regress/sqljson.metadata.json | 173 -- .../sqljson_jsontable.metadata.json | 77 - .../sqljson_queryfuncs.metadata.json | 238 --- .../postgres_regress/stats.metadata.json | 218 --- .../postgres_regress/stats_ext.metadata.json | 415 ----- .../postgres_regress/strings.metadata.json | 4 +- .../subscription.metadata.json | 8 - .../postgres_regress/subselect.metadata.json | 99 -- .../postgres_regress/sysviews.metadata.json | 23 +- .../tablesample.metadata.json | 26 - .../postgres_regress/tablespace.metadata.json | 26 - .../parse/postgres_regress/temp.metadata.json | 36 - .../parse/postgres_regress/text.metadata.json | 76 +- .../parse/postgres_regress/tid.metadata.json | 18 - .../tidrangescan.metadata.json | 17 - .../postgres_regress/tidscan.metadata.json | 14 - .../parse/postgres_regress/time.metadata.json | 34 +- .../postgres_regress/timestamp.metadata.json | 87 +- .../timestamptz.metadata.json | 252 +-- .../postgres_regress/timetz.metadata.json | 37 - .../transactions.metadata.json | 63 - .../postgres_regress/triggers.metadata.json | 88 - .../postgres_regress/truncate.metadata.json | 49 - .../postgres_regress/tsdicts.metadata.json | 95 - .../postgres_regress/tsearch.metadata.json | 383 +---- .../parse/postgres_regress/tsrf.metadata.json | 54 - .../postgres_regress/tstypes.metadata.json | 239 +-- .../postgres_regress/tuplesort.metadata.json | 22 - .../parse/postgres_regress/txid.metadata.json | 31 - .../type_sanity.metadata.json | 62 +- .../typed_table.metadata.json | 3 - .../postgres_regress/unicode.metadata.json | 20 +- .../postgres_regress/union.metadata.json | 98 -- .../updatable_views.metadata.json | 188 -- .../postgres_regress/update.metadata.json | 20 - .../parse/postgres_regress/uuid.metadata.json | 21 - .../postgres_regress/vacuum.metadata.json | 19 - .../vacuum_parallel.metadata.json | 2 - .../postgres_regress/varchar.metadata.json | 13 +- .../postgres_regress/window.metadata.json | 304 +--- .../parse/postgres_regress/with.metadata.json | 151 -- .../write_parallel.metadata.json | 1 - .../parse/postgres_regress/xid.metadata.json | 63 - .../parse/postgres_regress/xml.metadata.json | 220 +-- .../postgres_regress/xmlmap.metadata.json | 30 +- 358 files changed, 6731 insertions(+), 16755 deletions(-) create mode 100644 cmd/difftest/main.go create mode 100644 internal/emit/emit.go create mode 100644 internal/emit/roundtrip_test.go create mode 100644 internal/lexer/grammar_errors.go create mode 100644 internal/parse/cexpr.go create mode 100644 internal/parse/expr.go create mode 100644 internal/parse/func.go create mode 100644 internal/parse/gram_support.go create mode 100644 internal/parse/names.go create mode 100644 internal/parse/nodes.go create mode 100644 internal/parse/parser.go create mode 100644 internal/parse/select.go create mode 100644 internal/parse/tablefuncs.go create mode 100644 internal/parse/typename.go diff --git a/PLAN.md b/PLAN.md index 05e5e7f..deed895 100644 --- a/PLAN.md +++ b/PLAN.md @@ -380,12 +380,15 @@ gate; the corpus harness exists before the first line of the lexer. met: all 43,373 scan cases and all 8 split_scanner cases pass; xxh3 is verified against 126 oracle-generated vectors covering every length class and seed path. See "As-built notes (milestone 3)". -4. **Expressions + SELECT.** `a_expr`/`b_expr`/`c_expr` precedence machinery, - constants and typecasts, `func_expr` (including `json_*`, `xml*`, - aggregate `FILTER`/`WITHIN GROUP`, window functions), `SELECT` end-to-end: - target list, `FROM` (joins, `LATERAL`, table functions, `TABLESAMPLE`), - grouping sets, set operations, CTEs (`MATERIALIZED`, `SEARCH`/`CYCLE`), - `VALUES`, locking clauses. The largest single chunk of work. +4. **Expressions + SELECT.** ✅ *Landed 2026-08-15.* `a_expr`/`b_expr`/ + `c_expr` precedence machinery, constants and typecasts, `func_expr` + (including `json_*`, `xml*`, aggregate `FILTER`/`WITHIN GROUP`, window + functions), `SELECT` end-to-end: target list, `FROM` (joins, `LATERAL`, + table functions, `TABLESAMPLE`, `XMLTABLE`, `JSON_TABLE`), grouping + sets, set operations, CTEs (`MATERIALIZED`, `SEARCH`/`CYCLE`), `VALUES`, + locking clauses. The largest single chunk of work. `ParseToJSON` ships + here too (the generated-equivalent JSON emitter plus `Parse`/ + `ParseToProtobuf`). See "As-built notes (milestone 4)". 5. **DML.** `INSERT` (`ON CONFLICT`, `OVERRIDING`), `UPDATE`, `DELETE`, `MERGE`, `RETURNING`, `COPY`, `PREPARE`/`EXECUTE`, cursors. 6. **DDL, part 1.** `CREATE`/`ALTER TABLE` (the second-biggest grammar @@ -479,6 +482,49 @@ Measured at the pin, where the plan's estimates differ: - `internal/xxh3` implements only `XXH3_64bits_withSeed` (scalar paths), the sole entry point the API needs. +### As-built notes (milestone 4) + +- The JSON emitter (`internal/emit`) is a protobuf-descriptor-driven walker + rather than generated per-node code: the pinned proto was itself generated + from the C struct metadata, so field declaration order, `json_name`, and + field kinds already encode everything `pg_query_outfuncs_json.c` does. The + hand-written special cases (`A_Const`, the five value nodes, `List` + variants, `_outToken` escaping, two always-emitted empty-string fields) + mirror the reference file. Byte-parity is proven corpus-wide by + `internal/emit.TestGoldenRoundTrip`, which protojson-decodes all 42,970 + tree goldens and re-emits them byte-identically. Generated per-node + emitters remain an option for milestone 12 if profiling wants them. +- The parser (`internal/parse`) reproduces bison's conflict resolution by + precedence climbing: left-assoc operators parse their right operand one + level up, `%nonassoc` levels error when chained within one climb, and the + `%prec` annotations are reproduced at their call sites. Two behaviors + worth calling out: `a_expr subquery_Op sub_type` enters the loop at the + operator token's own precedence but reduces at `%prec Op` (so + `1 = 2 = ANY(...)` fails at the second `=` while `= ANY(...) + 1` binds + the `+` outside), and qual-requiring JOINs absorb further joins into + their right operand (bison shifts because the rule cannot reduce until + its join_qual) while CROSS/NATURAL joins stay left-associative. +- LALR keeps sub-select and parenthesized-expression paths alive + simultaneously; the recursive-descent port uses bounded backtracking + (token-position mark/reset) in exactly four places: `(`-headed c_expr / + in_expr / table_ref (select_with_parens trials, pre-gated by a + skip-the-parens lookahead for a SELECT/VALUES/TABLE/WITH head), and the + OVERLAY/SUBSTRING/JSON_OBJECT special-vs-generic argument forms. +- The `NOT_LA`/`WITH_LA`/`FORMAT_LA` merges arrive pre-applied from the + milestone-3 filter; grammar errors report through the same + scanner_yyerror path the C stack uses (`base_yyerror` → `parser_yyerror` + → `scanner_yyerror`), so syntax errors carry `scan.l` error data and the + merged tokens report only their first word, exactly as parser.c's + hold-char poke arranges. +- Corpus effect: 16,300+ parse cases came off the todo list. Every + remaining parse todo either starts with a statement type from milestones + 5-7 or embeds one (DML inside CTEs); the only pure-SELECT stragglers are + negative cases whose error texts come from those same unimplemented + productions. +- `cmd/difftest` currently ships the interim `-summary`/`-show` failure + classifier used to drive the milestone; the mutation fuzzer replaces it + in milestone 12. + ## Regeneration (the PostgreSQL-upgrade story) Everything derived is derived by committed tooling from the pin: diff --git a/cmd/difftest/main.go b/cmd/difftest/main.go new file mode 100644 index 0000000..e7aa5d7 --- /dev/null +++ b/cmd/difftest/main.go @@ -0,0 +1,175 @@ +// Command difftest will run mutation differential fuzzing against the live +// oracle (milestone 12). For now it provides the -summary mode used during +// grammar bring-up: it walks the parse corpus's remaining todo cases, runs +// them through the current parser, and classifies the failures so the +// development loop can attack the biggest buckets first. +package main + +import ( + "errors" + "flag" + "fmt" + "os" + "path/filepath" + "regexp" + "sort" + "strings" + + pg_query "github.com/sqlc-dev/oliphant" + "github.com/sqlc-dev/oliphant/internal/testfile" + "github.com/sqlc-dev/oliphant/parser" +) + +func main() { + var ( + summary = flag.Bool("summary", false, "classify remaining parse todo failures") + show = flag.String("show", "", "print the first N failing cases whose bucket matches this substring") + limit = flag.Int("n", 5, "how many cases to print with -show") + root = flag.String("root", "parser/testdata/parse", "corpus root") + ) + flag.Parse() + if !*summary && *show == "" { + fmt.Fprintln(os.Stderr, "usage: difftest -summary | -show [-n N]") + os.Exit(2) + } + + buckets := map[string]int{} + type sample struct{ file, name, input, got, want string } + var samples []sample + + var files []string + filepath.WalkDir(*root, func(path string, d os.DirEntry, err error) error { + if err == nil && !d.IsDir() && strings.HasSuffix(path, ".test") { + files = append(files, path) + } + return nil + }) + for _, path := range files { + cases, err := testfile.Read(path) + if err != nil { + panic(err) + } + meta, err := testfile.ReadMetadata(path) + if err != nil { + panic(err) + } + todo := map[string]bool{} + for _, n := range meta.Todo { + todo[n] = true + } + for _, c := range cases { + if !todo[c.Name] { + continue + } + got := evaluate(c.Input) + if got == c.Expected { + continue + } + b := classify(got, c.Expected) + buckets[b]++ + if *show != "" && strings.Contains(b, *show) && len(samples) < *limit { + samples = append(samples, sample{path, c.Name, c.Input, got, c.Expected}) + } + } + } + + if *summary { + type kv struct { + k string + v int + } + var list []kv + total := 0 + for k, v := range buckets { + list = append(list, kv{k, v}) + total += v + } + sort.Slice(list, func(i, j int) bool { return list[i].v > list[j].v }) + for _, e := range list { + fmt.Printf("%7d %s\n", e.v, e.k) + } + fmt.Printf("%7d TOTAL failing\n", total) + } + for _, s := range samples { + fmt.Printf("=== %s %s\ninput:\n%s\ngot:\n%s\nwant:\n%s\n\n", s.file, s.name, s.input, s.got, s.want) + } +} + +func evaluate(input string) string { + out, err := pg_query.ParseToJSON(input) + if err != nil { + if pe, ok := errAsParser(err); ok { + return testfile.RenderError(testfile.ErrorExpectation{ + Message: pe.Message, + Cursorpos: pe.Cursorpos, + Filename: pe.Filename, + Funcname: pe.Funcname, + Context: pe.Context, + }) + } + return "UNIMPLEMENTED: " + err.Error() + } + return out +} + +var firstDiffRe = regexp.MustCompile(`"([A-Za-z_0-9]+)":`) + +// classify produces a coarse failure bucket. +func classify(got, want string) string { + gotErr := strings.HasPrefix(got, "ERROR: ") + wantErr := strings.HasPrefix(want, "ERROR: ") + switch { + case gotErr && wantErr: + g := strings.SplitN(got, "\n", 2)[0] + w := strings.SplitN(want, "\n", 2)[0] + if g == w { + return "error-detail-mismatch (message equal)" + } + return "error-vs-error message differs" + case gotErr && !wantErr: + // We reject what the oracle accepts: the interesting bucket. + msg := strings.SplitN(got, "\n", 2)[0] + if m := regexp.MustCompile(`at or near "(.*)"$`).FindStringSubmatch(msg); m != nil { + word := m[1] + if len(word) > 20 { + word = word[:20] + } + return `reject: at or near "` + word + `"` + } + return "reject: " + msg + case !gotErr && wantErr: + return "accept-but-should-reject" + default: + // Tree mismatch: name the first differing JSON key. + i := 0 + for i < len(got) && i < len(want) && got[i] == want[i] { + i++ + } + start := i + if start > 40 { + start -= 40 + } else { + start = 0 + } + ctx := want[start:min(len(want), i+20)] + if m := firstDiffRe.FindAllString(ctx, -1); len(m) > 0 { + return "tree-diff near " + m[len(m)-1] + } + return "tree-diff" + } +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func errAsParser(err error) (*parser.Error, bool) { + var pe *parser.Error + if errors.As(err, &pe) { + return pe, true + } + return nil, false +} diff --git a/compat_test.go b/compat_test.go index 12c1d17..681a7ab 100644 --- a/compat_test.go +++ b/compat_test.go @@ -33,11 +33,7 @@ func TestNotImplementedErrors(t *testing.T) { } } - _, err := pg_query.Parse("SELECT 1") - check("Parse", err) - _, err = pg_query.ParseToJSON("SELECT 1") - check("ParseToJSON", err) - _, err = pg_query.Deparse(&pg_query.ParseResult{}) + _, err := pg_query.Deparse(&pg_query.ParseResult{}) check("Deparse", err) _, err = pg_query.Normalize("SELECT 1") check("Normalize", err) diff --git a/internal/emit/emit.go b/internal/emit/emit.go new file mode 100644 index 0000000..fb55ab4 --- /dev/null +++ b/internal/emit/emit.go @@ -0,0 +1,324 @@ +// Package emit renders parse trees as JSON with byte-parity to libpg_query's +// hand-rolled C emitter (pg_query_outfuncs_json.c + pg_query_json_helper.c at +// the pinned 17-6.2.2). +// +// The C emitter is generated from the same struct metadata the pinned +// pg_query.proto was generated from, so the proto descriptor carries +// everything the output format needs: message fields are declared in C struct +// order, each field's json_name is the C field name, and the field type +// selects the WRITE_*_FIELD macro. The walker below is therefore driven by +// protobuf reflection rather than by generated per-node code; byte-parity is +// enforced corpus-wide by the golden round-trip test in this package. +package emit + +import ( + "fmt" + "strconv" + "strings" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/sqlc-dev/oliphant/ast" +) + +// ParseResult renders the full document: pg_query_nodes_to_json. +func ParseResult(tree *ast.ParseResult) string { + var b strings.Builder + // pg_query_outfuncs_json.c: pg_query_nodes_to_json emits the version and + // the stmts array unconditionally (empty input => "stmts":[]). + b.WriteString(`{"version":`) + b.WriteString(strconv.FormatInt(int64(tree.Version), 10)) + b.WriteString(`,"stmts":[`) + for i, raw := range tree.Stmts { + if i > 0 { + b.WriteByte(',') + } + // RawStmt fields are emitted inline, without a node-type wrapper. + b.WriteByte('{') + emitFields(&b, raw.ProtoReflect()) + b.WriteByte('}') + } + b.WriteString(`]}`) + return b.String() +} + +// Node renders one node with its type wrapper: _outNode. +func Node(msg proto.Message) string { + var b strings.Builder + emitNode(&b, msg.ProtoReflect()) + return b.String() +} + +// emitNode is _outNode: {"":{...fields...}} for a Node message, +// dispatching on the oneof member. An unset Node (a NULL list element +// upstream) renders as {}. +func emitNode(b *strings.Builder, m protoreflect.Message) { + d := m.Descriptor() + if d.Name() != "Node" { + // A specific node type reached through a typed field: the C emitter + // prints its fields without a wrapper (WRITE_SPECIFIC_NODE_PTR_FIELD). + b.WriteByte('{') + emitFields(b, m) + b.WriteByte('}') + return + } + od := d.Oneofs().ByName("node") + fd := m.WhichOneof(od) + if fd == nil { + b.WriteString("{}") + return + } + b.WriteByte('{') + b.WriteByte('"') + b.WriteString(fd.JSONName()) + b.WriteString(`":{`) + emitFields(b, m.Get(fd).Message()) + b.WriteString("}}") +} + +// emitFields renders a message's fields in declaration (= C struct) order, +// applying the WRITE_*_FIELD zero-omission rules. Returns the number of +// fields written. +func emitFields(b *strings.Builder, m protoreflect.Message) int { + d := m.Descriptor() + + // Special-cased node types, mirroring the hand-written emitters in + // pg_query_outfuncs_json.c. + switch d.Name() { + case "A_Const": + emitAConst(b, m) + return 1 + case "Integer": + // _outInteger: omit the default 0, to match protobuf's behavior. + v := m.Get(d.Fields().ByName("ival")).Int() + if v == 0 { + return 0 + } + fmt.Fprintf(b, `"ival":%d`, v) + return 1 + case "Boolean": + // _outBoolean: always emitted, true or false. + fmt.Fprintf(b, `"boolval":%s`, boolStr(m.Get(d.Fields().ByName("boolval")).Bool())) + return 1 + case "Float": + b.WriteString(`"fval":`) + emitToken(b, m.Get(d.Fields().ByName("fval")).String()) + return 1 + case "String": + b.WriteString(`"sval":`) + emitToken(b, m.Get(d.Fields().ByName("sval")).String()) + return 1 + case "BitString": + b.WriteString(`"bsval":`) + emitToken(b, m.Get(d.Fields().ByName("bsval")).String()) + return 1 + case "List", "IntList", "OidList": + // _outList/_outIntList/_outOidList: "items" always present. + b.WriteString(`"items":[`) + items := m.Get(d.Fields().ByName("items")).List() + for i := 0; i < items.Len(); i++ { + if i > 0 { + b.WriteByte(',') + } + emitNode(b, items.Get(i).Message()) + } + b.WriteByte(']') + return 1 + } + + fields := d.Fields() + written := 0 + sep := func() { + if written > 0 { + b.WriteByte(',') + } + written++ + } + for i := 0; i < fields.Len(); i++ { + fd := fields.Get(i) + v := m.Get(fd) + switch { + case fd.IsList(): + // WRITE_LIST_FIELD: omitted when NIL (empty). + l := v.List() + if l.Len() == 0 { + continue + } + sep() + b.WriteByte('"') + b.WriteString(fd.JSONName()) + b.WriteString(`":[`) + for j := 0; j < l.Len(); j++ { + if j > 0 { + b.WriteByte(',') + } + switch fd.Kind() { + case protoreflect.MessageKind: + emitNode(b, l.Get(j).Message()) + case protoreflect.Uint64Kind, protoreflect.Uint32Kind: + fmt.Fprintf(b, "%d", l.Get(j).Uint()) + default: + fmt.Fprintf(b, "%d", l.Get(j).Int()) + } + } + b.WriteByte(']') + case fd.Kind() == protoreflect.MessageKind: + // WRITE_NODE_PTR_FIELD / WRITE_SPECIFIC_NODE_PTR_FIELD: omitted + // when NULL. + if !m.Has(fd) { + continue + } + sep() + b.WriteByte('"') + b.WriteString(fd.JSONName()) + b.WriteString(`":`) + emitNode(b, v.Message()) + case fd.Kind() == protoreflect.EnumKind: + // WRITE_ENUM_FIELD: always emitted, by C enum name (the proto + // enum value names are the C names). + sep() + b.WriteByte('"') + b.WriteString(fd.JSONName()) + b.WriteString(`":"`) + b.WriteString(string(fd.Enum().Values().ByNumber(v.Enum()).Name())) + b.WriteByte('"') + case fd.Kind() == protoreflect.BoolKind: + // WRITE_BOOL_FIELD: emitted only when true. + if !v.Bool() { + continue + } + sep() + b.WriteByte('"') + b.WriteString(fd.JSONName()) + b.WriteString(`":true`) + case fd.Kind() == protoreflect.StringKind: + // WRITE_STRING_FIELD / WRITE_CHAR_FIELD: omitted when NULL/0. A + // non-NULL empty C string is indistinguishable in proto3; the + // places upstream produces one (String.sval is handled above) are + // fields the grammar always assigns, listed in alwaysEmitString. + if v.String() == "" && !alwaysEmitString[string(d.Name())+"."+fd.JSONName()] { + continue + } + sep() + b.WriteByte('"') + b.WriteString(fd.JSONName()) + b.WriteString(`":`) + emitToken(b, v.String()) + case fd.Kind() == protoreflect.DoubleKind, fd.Kind() == protoreflect.FloatKind: + // WRITE_FLOAT_FIELD: always emitted, %f. + sep() + fmt.Fprintf(b, `"%s":%f`, fd.JSONName(), v.Float()) + case fd.Kind() == protoreflect.Uint32Kind, fd.Kind() == protoreflect.Uint64Kind: + // WRITE_UINT_FIELD: omitted when 0. + if v.Uint() == 0 { + continue + } + sep() + fmt.Fprintf(b, `"%s":%d`, fd.JSONName(), v.Uint()) + default: + // WRITE_INT_FIELD / WRITE_LONG_FIELD: omitted when 0. + if v.Int() == 0 { + continue + } + sep() + fmt.Fprintf(b, `"%s":%d`, fd.JSONName(), v.Int()) + } + } + return written +} + +// emitAConst is _outAConst: the value union member wrapped in an object under +// its member name, and the location emitted unconditionally. +func emitAConst(b *strings.Builder, m protoreflect.Message) { + d := m.Descriptor() + if m.Get(d.Fields().ByName("isnull")).Bool() { + b.WriteString(`"isnull":true`) + } else if fd := m.WhichOneof(d.Oneofs().ByName("val")); fd != nil { + b.WriteByte('"') + b.WriteString(fd.JSONName()) + b.WriteString(`":{`) + inner := m.Get(fd).Message() + switch fd.JSONName() { + case "ival": + // _outInteger: zero omitted => "ival":{} + if v := inner.Get(inner.Descriptor().Fields().ByName("ival")).Int(); v != 0 { + fmt.Fprintf(b, `"ival":%d`, v) + } + case "fval": + b.WriteString(`"fval":`) + emitToken(b, inner.Get(inner.Descriptor().Fields().ByName("fval")).String()) + case "boolval": + // _outAConst emits "boolval":{} for false. + if inner.Get(inner.Descriptor().Fields().ByName("boolval")).Bool() { + b.WriteString(`"boolval":true`) + } + case "sval": + b.WriteString(`"sval":`) + emitToken(b, inner.Get(inner.Descriptor().Fields().ByName("sval")).String()) + case "bsval": + b.WriteString(`"bsval":`) + emitToken(b, inner.Get(inner.Descriptor().Fields().ByName("bsval")).String()) + } + b.WriteByte('}') + } else { + // A_Const with no value member set cannot come from the parser; the C + // union would have printed garbage. Render nothing but the location. + b.WriteString(`"isnull":true`) + } + loc := m.Get(d.Fields().ByName("location")).Int() + fmt.Fprintf(b, `,"location":%d`, loc) +} + +// emitToken is _outToken: JSON string quoting with the reference's exact +// escape set — \b \f \n \r \t \" \\ as two-character escapes, and \u%04x for +// other control bytes plus '<' and '>'. +func emitToken(b *strings.Builder, s string) { + b.WriteByte('"') + for i := 0; i < len(s); i++ { + c := s[i] + if c == 0 { + // The C emitter walks a NUL-terminated string. + break + } + switch c { + case '\b': + b.WriteString(`\b`) + case '\f': + b.WriteString(`\f`) + case '\n': + b.WriteString(`\n`) + case '\r': + b.WriteString(`\r`) + case '\t': + b.WriteString(`\t`) + case '"': + b.WriteString(`\"`) + case '\\': + b.WriteString(`\\`) + default: + if c < ' ' || c == '<' || c == '>' { + fmt.Fprintf(b, `\u%04x`, c) + } else { + b.WriteByte(c) + } + } + } + b.WriteByte('"') +} + +// alwaysEmitString lists string fields whose C value is never NULL — the +// grammar assigns them unconditionally, and ” is legal input — so the C +// emitter always writes them, even when empty. (proto3 cannot represent the +// NULL/"" distinction; for these fields "" means present.) +var alwaysEmitString = map[string]bool{ + "CreateSubscriptionStmt.conninfo": true, // CONNECTION Sconst is required syntax + "CreateTableSpaceStmt.location": true, // LOCATION Sconst is required syntax +} + +func boolStr(v bool) string { + if v { + return "true" + } + return "false" +} diff --git a/internal/emit/roundtrip_test.go b/internal/emit/roundtrip_test.go new file mode 100644 index 0000000..43f4b48 --- /dev/null +++ b/internal/emit/roundtrip_test.go @@ -0,0 +1,67 @@ +package emit + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "google.golang.org/protobuf/encoding/protojson" + + "github.com/sqlc-dev/oliphant/ast" + "github.com/sqlc-dev/oliphant/internal/testfile" +) + +// TestGoldenRoundTrip proves the emitter's byte-parity over the entire parse +// corpus without needing the parser: every tree golden (written verbatim from +// the oracle's ParseToJSON) is decoded via protojson — which tolerates any +// field order and escaping — and re-emitted; the bytes must match the golden +// exactly. This exercises every node type, field-order, zero-omission, and +// escaping rule the corpus reaches. +func TestGoldenRoundTrip(t *testing.T) { + root := filepath.Join("..", "..", "parser", "testdata", "parse") + if _, err := os.Stat(root); err != nil { + t.Skip("parse corpus not present") + } + var files []string + err := filepath.WalkDir(root, func(path string, d os.DirEntry, err error) error { + if err != nil { + return err + } + if !d.IsDir() && strings.HasSuffix(path, ".test") { + files = append(files, path) + } + return nil + }) + if err != nil { + t.Fatal(err) + } + trees, mismatches := 0, 0 + for _, path := range files { + cases, err := testfile.Read(path) + if err != nil { + t.Fatal(err) + } + for _, c := range cases { + if testfile.IsError(c.Expected) { + continue + } + tree := &ast.ParseResult{} + if err := protojson.Unmarshal([]byte(c.Expected), tree); err != nil { + t.Fatalf("%s case %s: protojson: %v", path, c.Name, err) + } + trees++ + if got := ParseResult(tree); got != c.Expected { + mismatches++ + if mismatches <= 5 { + t.Errorf("%s case %s: emit mismatch\ngot: %s\nwant: %s", + path, c.Name, got, c.Expected) + } + } + } + } + if mismatches > 5 { + t.Errorf("...and %d more mismatches", mismatches-5) + } + t.Logf("round-tripped %d trees from %d files", trees, len(files)) +} diff --git a/internal/lexer/grammar_errors.go b/internal/lexer/grammar_errors.go new file mode 100644 index 0000000..c8dcfc5 --- /dev/null +++ b/internal/lexer/grammar_errors.go @@ -0,0 +1,44 @@ +package lexer + +// Grammar-side error support: the recursive-descent parser reports errors +// through the scanner because that is how the C stack works — gram.y's +// base_yyerror is parser_yyerror, which calls scanner_yyerror, so every +// "syntax error" carries scan.l/scanner_yyerror error data and a +// character-based cursor position. + +// SyntaxError builds bison's yyerror report for the given lookahead token: +// `syntax error at or near ""` (or "at end of input"), positioned +// at the token's start. The quoted text spans the token's match — parser.c's +// base_yylex pokes a NUL at the current token's end before any lookahead, so +// merged tokens (NOT_LA etc.) report only their first word. +func (f *Filter) SyntaxError(tok Token) *Error { + return f.s.yyerrorToken(tok, "syntax error") +} + +// SyntaxErrorMsg is parser_yyerror(msg) with a message other than "syntax +// error" (e.g. `improper use of "*"`), decorated the same way. +func (f *Filter) SyntaxErrorMsg(tok Token, msg string) *Error { + return f.s.yyerrorToken(tok, msg) +} + +// ParserError is an ereport(ERROR, ...) from a gram.y action or support +// function: no "at or near" decoration; funcname names the C function +// containing the ereport (base_yyparse for inline rule actions). +func (f *Filter) ParserError(funcname, message string, loc int) *Error { + e := &Error{ + Message: message, + Filename: "gram.y", + Funcname: funcname, + } + if loc >= 0 { + // parser_errposition: -1 means "no position available". + e.Cursorpos = f.s.cursorpos(loc) + } + return e +} + +// Cursorpos is scanner_errposition for a byte offset: the 1-based character +// position. +func (f *Filter) Cursorpos(loc int) int { + return f.s.cursorpos(loc) +} diff --git a/internal/lexer/lexer.go b/internal/lexer/lexer.go index 009b8ed..de2dc88 100644 --- a/internal/lexer/lexer.go +++ b/internal/lexer/lexer.go @@ -61,6 +61,9 @@ func New(input string) *Scanner { return &Scanner{input: input} } +// Input returns the input string as scanned (truncated at any NUL byte). +func (s *Scanner) Input() string { return s.input } + // Character classes from scan.l's named patterns. // scan.l: space diff --git a/internal/parse/cexpr.go b/internal/parse/cexpr.go new file mode 100644 index 0000000..5cd694e --- /dev/null +++ b/internal/parse/cexpr.go @@ -0,0 +1,386 @@ +package parse + +import ( + "github.com/sqlc-dev/oliphant/ast" + "github.com/sqlc-dev/oliphant/internal/lexer" +) + +// parseCExprEx is gram.y's c_expr. The second result reports whether the +// node is a "row" in the grammar sense (explicit_row or implicit_row), which +// the a_expr OVERLAPS production needs. +func (p *parser) parseCExprEx() (*ast.Node, bool) { + tok := p.peek() + switch tok.Kind { + case ast.Token_PARAM: + // c_expr: PARAM opt_indirection + p.next() + pr := nParamRef(&ast.ParamRef{Number: tok.Ival, Location: tok.Start}) + if ind := p.parseOptIndirection(); ind != nil { + return nAIndirection(&ast.A_Indirection{Arg: pr, Indirection: p.check_indirection(ind)}), false + } + return pr, false + + case ast.Token('('): + // c_expr: select_with_parens [indirection] | '(' a_expr ')' + // opt_indirection | implicit_row + if sel, ok := p.trySelectWithParens(); ok { + // c_expr: select_with_parens %prec UMINUS / select_with_parens indirection + sl := nSubLink(&ast.SubLink{ + SubLinkType: ast.SubLinkType_EXPR_SUBLINK, + Subselect: sel, + Location: tok.Start, + }) + if ind := p.parseOptIndirection(); ind != nil { + return nAIndirection(&ast.A_Indirection{Arg: sl, Indirection: p.check_indirection(ind)}), false + } + return sl, false + } + p.next() + expr := p.parseAExpr(0) + if p.have(ast.Token(',')) { + // implicit_row: '(' expr_list ',' a_expr ')' + args := []*ast.Node{expr} + args = append(args, p.parseAExpr(0)) + for p.have(ast.Token(',')) { + args = append(args, p.parseAExpr(0)) + } + p.expect(ast.Token(')')) + return nRowExpr(&ast.RowExpr{ + Args: args, + RowFormat: ast.CoercionForm_COERCE_IMPLICIT_CAST, + Location: tok.Start, + }), true + } + p.expect(ast.Token(')')) + if ind := p.parseOptIndirection(); ind != nil { + return nAIndirection(&ast.A_Indirection{Arg: expr, Indirection: p.check_indirection(ind)}), false + } + return expr, false + + case ast.Token_CASE: + return p.parseCaseExpr(), false + + case ast.Token_EXISTS: + // c_expr: EXISTS select_with_parens — but EXISTS is a col_name + // keyword, so bare EXISTS falls through to columnref. + if p.kindN(1) == ast.Token('(') { + p.next() + sel := p.mustSelectWithParens() + return nSubLink(&ast.SubLink{ + SubLinkType: ast.SubLinkType_EXISTS_SUBLINK, + Subselect: sel, + Location: tok.Start, + }), false + } + + case ast.Token_ARRAY: + // c_expr: ARRAY select_with_parens | ARRAY array_expr + p.next() + if p.kind() == ast.Token('[') { + arr := p.parseArrayExpr() + // point outermost A_ArrayExpr to the ARRAY keyword + arr.GetAArrayExpr().Location = tok.Start + return arr, false + } + sel := p.mustSelectWithParens() + return nSubLink(&ast.SubLink{ + SubLinkType: ast.SubLinkType_ARRAY_SUBLINK, + Subselect: sel, + Location: tok.Start, + }), false + + case ast.Token_ROW: + // c_expr: explicit_row — ROW is a col_name keyword; bare ROW is a + // columnref. + if p.kindN(1) == ast.Token('(') { + p.next() + p.next() // '(' + var args []*ast.Node + if p.kind() != ast.Token(')') { + args = p.parseExprList() + } + p.expect(ast.Token(')')) + return nRowExpr(&ast.RowExpr{ + Args: args, + RowFormat: ast.CoercionForm_COERCE_EXPLICIT_CALL, + Location: tok.Start, + }), true + } + + case ast.Token_GROUPING: + // c_expr: GROUPING '(' expr_list ')' — col_name keyword, same deal. + if p.kindN(1) == ast.Token('(') { + p.next() + p.next() + args := p.parseExprList() + p.expect(ast.Token(')')) + return nGroupingFunc(&ast.GroupingFunc{Args: args, Location: tok.Start}), false + } + + case ast.Token_ICONST: + p.next() + return makeIntConst(tok.Ival, tok.Start), false + case ast.Token_FCONST: + p.next() + return makeFloatConst(tok.Str, tok.Start), false + case ast.Token_SCONST: + p.next() + return makeStringConst(tok.Str, tok.Start), false + case ast.Token_BCONST: + p.next() + return makeBitStringConst(tok.Str, tok.Start), false + case ast.Token_XCONST: + // AexprConst: XCONST is a bit constant per SQL99 + p.next() + return makeBitStringConst(tok.Str, tok.Start), false + case ast.Token_TRUE_P: + p.next() + return makeBoolAConst(true, tok.Start), false + case ast.Token_FALSE_P: + p.next() + return makeBoolAConst(false, tok.Start), false + case ast.Token_NULL_P: + p.next() + return makeNullAConst(tok.Start), false + } + + if n := p.parseFuncExprKeyword(tok); n != nil { + return n, false + } + return p.parseFuncOrColumnRef(), false +} + +// parseCaseExpr is gram.y's case_expr: +// CASE case_arg when_clause_list case_default END_P +func (p *parser) parseCaseExpr() *ast.Node { + tok := p.expect(ast.Token_CASE) + c := &ast.CaseExpr{Location: tok.Start} + if p.kind() != ast.Token_WHEN { + c.Arg = p.parseAExpr(0) + } + // when_clause_list: there must be at least one + w := p.expect(ast.Token_WHEN) + for { + expr := p.parseAExpr(0) + p.expect(ast.Token_THEN) + result := p.parseAExpr(0) + c.Args = append(c.Args, nCaseWhen(&ast.CaseWhen{ + Expr: expr, Result: result, Location: w.Start, + })) + if p.kind() != ast.Token_WHEN { + break + } + w = p.next() + } + if p.have(ast.Token_ELSE) { + c.Defresult = p.parseAExpr(0) + } + p.expect(ast.Token_END_P) + return nCaseExpr(c) +} + +// parseArrayExpr is gram.y's array_expr: +// '[' expr_list ']' | '[' array_expr_list ']' | '[' ']' +func (p *parser) parseArrayExpr() *ast.Node { + tok := p.expect(ast.Token('[')) + var elems []*ast.Node + switch p.kind() { + case ast.Token(']'): + case ast.Token('['): + elems = []*ast.Node{p.parseArrayExpr()} + for p.have(ast.Token(',')) { + elems = append(elems, p.parseArrayExpr()) + } + default: + elems = p.parseExprList() + } + p.expect(ast.Token(']')) + return makeAArrayExpr(elems, tok.Start) +} + +// parseOptIndirection is gram.y's opt_indirection; returns nil when empty. +func (p *parser) parseOptIndirection() []*ast.Node { + var list []*ast.Node + for { + el, ok := p.parseIndirectionEl() + if !ok { + return list + } + list = append(list, el) + } +} + +// parseIndirectionEl is gram.y's indirection_el; reports false when the +// current token does not start one. +func (p *parser) parseIndirectionEl() (*ast.Node, bool) { + switch p.kind() { + case ast.Token('.'): + p.next() + if p.have(ast.Token('*')) { + return nAStar(), true + } + return nStr(p.attrName()), true + case ast.Token('['): + p.next() + ai := &ast.A_Indices{} + if p.kind() == ast.Token(':') { + // '[' opt_slice_bound ':' opt_slice_bound ']' with empty lower + p.next() + ai.IsSlice = true + if p.kind() != ast.Token(']') { + ai.Uidx = p.parseAExpr(0) + } + p.expect(ast.Token(']')) + return nAIndices(ai), true + } + idx := p.parseAExpr(0) + if p.have(ast.Token(':')) { + ai.IsSlice = true + ai.Lidx = idx + if p.kind() != ast.Token(']') { + ai.Uidx = p.parseAExpr(0) + } + } else { + ai.Uidx = idx + } + p.expect(ast.Token(']')) + return nAIndices(ai), true + } + return nil, false +} + +// parseFuncOrColumnRef handles the identifier-led c_expr alternatives, which +// LALR only separates by lookahead after the (possibly qualified) name: +// +// columnref: ColId | ColId indirection +// func_application: func_name '(' ... +// AexprConst: func_name Sconst | func_name '(' ... ')' Sconst +// | func_name PARAM | func_name '(' ... ')' PARAM +// +// func_name is type_function_name | ColId indirection, so a +// type_func_name_keyword can head a function call or constant but never a +// columnref. +func (p *parser) parseFuncOrColumnRef() *ast.Node { + tok := p.peek() + + if !isColIdToken(tok) { + if !isTypeFunctionNameToken(tok) { + p.syntaxError(tok) + } + // type_func_name_keyword: only func_name forms are possible, and + // func_name from type_function_name takes no attrs. + p.next() + name := []*ast.Node{nStr(tok.Str)} + switch p.kind() { + case ast.Token('('): + return p.parseFuncApplicationRest(name, tok) + case ast.Token_SCONST: + s := p.next() + t := makeTypeNameFromNameList(name) + t.Location = tok.Start + return makeStringConstCast(s.Str, s.Start, t) + case ast.Token_PARAM: + prm := p.next() + t := makeTypeNameFromNameList(name) + t.Location = tok.Start + return makeParamRefCast(prm.Ival, prm.Start, t) + } + p.syntaxErrorAt() + } + + p.next() + indirection := p.parseOptIndirection() + + // Only pure dotted-name indirection can form a func_name or a const's + // type name; anything with subscripts or '.*' is a columnref. + allNames := true + for _, el := range indirection { + if asString(el) == nil { + allNames = false + break + } + } + + if allNames { + switch p.kind() { + case ast.Token('('): + name := append([]*ast.Node{nStr(tok.Str)}, indirection...) + return p.parseFuncApplicationRest(p.check_func_name(name), tok) + case ast.Token_SCONST: + s := p.next() + t := makeTypeNameFromNameList(append([]*ast.Node{nStr(tok.Str)}, indirection...)) + t.Location = tok.Start + return makeStringConstCast(s.Str, s.Start, t) + case ast.Token_PARAM: + prm := p.next() + t := makeTypeNameFromNameList(append([]*ast.Node{nStr(tok.Str)}, indirection...)) + t.Location = tok.Start + return makeParamRefCast(prm.Ival, prm.Start, t) + } + } + + // columnref: ColId | ColId indirection + return p.makeColumnRef(tok.Str, indirection, tok.Start) +} + +// looksLikeSelectAhead reports whether the '(' at the current position opens +// a select_with_parens: skipping consecutive '('s, the first other token +// must begin a SelectStmt. +func (p *parser) looksLikeSelectAhead() bool { + if p.kind() != ast.Token('(') { + return false + } + i := 0 + for p.kindN(i) == ast.Token('(') { + i++ + } + switch p.kindN(i) { + case ast.Token_SELECT, ast.Token_VALUES, ast.Token_TABLE, + ast.Token_WITH, ast.Token_WITH_LA: + return true + } + return false +} + +// trySelectWithParens attempts select_with_parens at the current position. +// LALR keeps the sub-select and parenthesized-expression paths alive +// simultaneously; recursive descent reproduces that with bounded +// backtracking. The trial is only attempted when the parenthesized content +// can begin a select, and its parse error wins if it got past the point +// where the two paths diverge (the select keyword itself). +func (p *parser) trySelectWithParens() (*ast.Node, bool) { + if !p.looksLikeSelectAhead() { + return nil, false + } + mark := p.mark() + var sel *ast.Node + err := p.try(func() { + sel = p.parseSelectWithParens() + }) + if err == nil { + return sel, true + } + p.reset(mark) + return nil, false +} + +// mustSelectWithParens parses select_with_parens, reporting the inner error +// on failure (no fallback path exists at the call sites). +func (p *parser) mustSelectWithParens() *ast.Node { + return p.parseSelectWithParens() +} + +// try runs f, catching a parse bail and returning its error. +func (p *parser) try(f func()) (err *lexer.Error) { + defer func() { + if r := recover(); r != nil { + if b, ok := r.(bail); ok { + err = b.err + return + } + panic(r) + } + }() + f() + return nil +} diff --git a/internal/parse/expr.go b/internal/parse/expr.go new file mode 100644 index 0000000..5a10bda --- /dev/null +++ b/internal/parse/expr.go @@ -0,0 +1,846 @@ +package parse + +import ( + "github.com/sqlc-dev/oliphant/ast" + "github.com/sqlc-dev/oliphant/internal/lexer" +) + +// Operator precedence ladder, from gram.y's %left/%right/%nonassoc +// declarations (higher binds tighter). The climber mirrors bison's conflict +// resolution: left-assoc parses its right operand one level up, nonassoc +// levels error when chained, and %prec annotations are reproduced at the +// call sites they annotate. +const ( + precOr = 1 // %left OR + precAnd = 2 // %left AND + precNot = 3 // %right NOT + precIs = 4 // %nonassoc IS ISNULL NOTNULL + precCmp = 5 // %nonassoc '<' '>' '=' LESS_EQUALS GREATER_EQUALS NOT_EQUALS + precLike = 6 // %nonassoc BETWEEN IN_P LIKE ILIKE SIMILAR NOT_LA + precEscape = 7 // %nonassoc ESCAPE + precOp = 8 // %left Op OPERATOR + precAdd = 9 // %left '+' '-' + precMul = 10 // %left '*' '/' '%' + precExp = 11 // %left '^' + precAt = 12 // %left AT + precCollate = 13 // %left COLLATE + precUminus = 14 // %right UMINUS +) + +// parseAExpr is gram.y's a_expr, parsed by precedence climbing: operators +// bind only while their level is at least minPrec. +func (p *parser) parseAExpr(minPrec int) *ast.Node { + start := p.peek() + var lhs *ast.Node + lhsIsRow := false + + switch start.Kind { + case ast.Token_NOT, ast.Token_NOT_LA: + // a_expr: NOT a_expr | NOT_LA a_expr %prec NOT + p.next() + lhs = makeNotExpr(p.parseAExpr(precNot), start.Start) + case ast.Token('+'): + // a_expr: '+' a_expr %prec UMINUS + p.next() + lhs = nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_OP, "+", nil, p.parseAExpr(precUminus), start.Start)) + case ast.Token('-'): + // a_expr: '-' a_expr %prec UMINUS + p.next() + lhs = doNegate(p.parseAExpr(precUminus), start.Start) + case ast.Token_Op: + // a_expr: qual_Op a_expr %prec Op + p.next() + lhs = nAExpr(makeA_Expr(ast.A_Expr_Kind_AEXPR_OP, []*ast.Node{nStr(start.Str)}, nil, p.parseAExpr(precOp+1), start.Start)) + case ast.Token_OPERATOR: + // a_expr: qual_Op a_expr %prec Op (OPERATOR '(' any_operator ')') + name := p.parseQualOp() + lhs = nAExpr(makeA_Expr(ast.A_Expr_Kind_AEXPR_OP, name, nil, p.parseAExpr(precOp+1), start.Start)) + case ast.Token_DEFAULT: + // a_expr: DEFAULT + p.next() + lhs = nSetToDefault(&ast.SetToDefault{Location: start.Start}) + case ast.Token_UNIQUE: + // a_expr: UNIQUE opt_unique_null_treatment select_with_parens + p.ereport("base_yyparse", "UNIQUE predicate is not yet implemented", start.Start) + default: + lhs, lhsIsRow = p.parseCExprEx() + } + + return p.parseAExprInfix(lhs, lhsIsRow, start, minPrec) +} + +// parseAExprInfix runs the infix/postfix part of the a_expr climb over an +// already-parsed left operand. +func (p *parser) parseAExprInfix(lhs *ast.Node, lhsIsRow bool, start lexer.Token, minPrec int) *ast.Node { + // lastNonassoc tracks the level of the last operator consumed by THIS + // loop, to reproduce bison's %nonassoc behavior: chaining two operators + // of the same nonassoc level is a syntax error at the second operator. + lastLevel := 0 + nonassoc := func(level int) { + if lastLevel == level { + p.syntaxErrorAt() + } + lastLevel = level + } + + for { + tok := p.peek() + switch tok.Kind { + case ast.Token_TYPECAST: + // a_expr: a_expr TYPECAST Typename + p.next() + lhs = makeTypeCast(lhs, p.parseTypename(), tok.Start) + lhsIsRow = false + continue + + case ast.Token_COLLATE: + // a_expr: a_expr COLLATE any_name + if precCollate < minPrec { + return lhs + } + p.next() + lhs = nCollateClause(&ast.CollateClause{Arg: lhs, Collname: p.anyName(), Location: tok.Start}) + lastLevel = 0 + lhsIsRow = false + continue + + case ast.Token_AT: + // a_expr: a_expr AT TIME ZONE a_expr %prec AT | a_expr AT LOCAL %prec AT + if precAt < minPrec { + return lhs + } + p.next() + if p.have(ast.Token_LOCAL) { + lhs = nFuncCall(makeFuncCall(SystemFuncName("timezone"), + []*ast.Node{lhs}, ast.CoercionForm_COERCE_SQL_SYNTAX, -1)) + } else { + p.expect(ast.Token_TIME) + p.expect(ast.Token_ZONE) + rhs := p.parseAExpr(precAt + 1) + lhs = nFuncCall(makeFuncCall(SystemFuncName("timezone"), + []*ast.Node{rhs, lhs}, ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + } + lastLevel = 0 + lhsIsRow = false + continue + + case ast.Token('^'): + if precExp < minPrec { + return lhs + } + if lhs2, ok := p.mathOpSubquery(lhs, tok); ok { + lhs, lastLevel, lhsIsRow = lhs2, precOp, false + continue + } + lhs = p.mathOpInfix(lhs, precExp+1) + lhsIsRow = false + continue + + case ast.Token('*'), ast.Token('/'), ast.Token('%'): + if precMul < minPrec { + return lhs + } + if lhs2, ok := p.mathOpSubquery(lhs, tok); ok { + lhs, lastLevel, lhsIsRow = lhs2, precOp, false + continue + } + lhs = p.mathOpInfix(lhs, precMul+1) + lhsIsRow = false + continue + + case ast.Token('+'), ast.Token('-'): + if precAdd < minPrec { + return lhs + } + if lhs2, ok := p.mathOpSubquery(lhs, tok); ok { + lhs, lastLevel, lhsIsRow = lhs2, precOp, false + continue + } + lhs = p.mathOpInfix(lhs, precAdd+1) + lhsIsRow = false + continue + + case ast.Token('<'), ast.Token('>'), ast.Token('='), + ast.Token_LESS_EQUALS, ast.Token_GREATER_EQUALS, ast.Token_NOT_EQUALS: + if precCmp < minPrec { + return lhs + } + if sub := p.subTypeAfterOp(1); sub != ast.SubLinkType_SUB_LINK_TYPE_UNDEFINED { + // a_expr subquery_Op sub_type ... %prec Op — but the + // shift/reduce decision happens at the comparison token's own + // precedence. + nonassoc(precCmp) + p.next() + lhs = p.parseSubqueryOpRest(lhs, []*ast.Node{nStr(mathOpName(tok))}, tok) + lastLevel = precOp + lhsIsRow = false + continue + } + nonassoc(precCmp) + lhs = p.mathOpInfix(lhs, precCmp+1) + lhsIsRow = false + continue + + case ast.Token_Op: + if precOp < minPrec { + return lhs + } + if sub := p.subTypeAfterOp(1); sub != ast.SubLinkType_SUB_LINK_TYPE_UNDEFINED { + p.next() + lhs = p.parseSubqueryOpRest(lhs, []*ast.Node{nStr(tok.Str)}, tok) + lastLevel = precOp + lhsIsRow = false + continue + } + // a_expr qual_Op a_expr %prec Op + p.next() + lhs = nAExpr(makeA_Expr(ast.A_Expr_Kind_AEXPR_OP, []*ast.Node{nStr(tok.Str)}, lhs, p.parseAExpr(precOp+1), tok.Start)) + lastLevel = precOp + lhsIsRow = false + continue + + case ast.Token_OPERATOR: + if precOp < minPrec { + return lhs + } + name := p.parseQualOp() + if sub := p.subTypeAfterOp(0); sub != ast.SubLinkType_SUB_LINK_TYPE_UNDEFINED { + lhs = p.parseSubqueryOpRest(lhs, name, tok) + } else { + lhs = nAExpr(makeA_Expr(ast.A_Expr_Kind_AEXPR_OP, name, lhs, p.parseAExpr(precOp+1), tok.Start)) + } + lastLevel = precOp + lhsIsRow = false + continue + + case ast.Token_AND: + if precAnd < minPrec { + return lhs + } + p.next() + lhs = makeAndExpr(lhs, p.parseAExpr(precAnd+1), tok.Start) + lastLevel = precAnd + lhsIsRow = false + continue + + case ast.Token_OR: + if precOr < minPrec { + return lhs + } + p.next() + lhs = makeOrExpr(lhs, p.parseAExpr(precOr+1), tok.Start) + lastLevel = precOr + lhsIsRow = false + continue + + case ast.Token_LIKE, ast.Token_ILIKE: + if precLike < minPrec { + return lhs + } + if sub := p.subTypeAfterOp(1); sub != ast.SubLinkType_SUB_LINK_TYPE_UNDEFINED { + nonassoc(precLike) + p.next() + name := "~~" + if tok.Kind == ast.Token_ILIKE { + name = "~~*" + } + lhs = p.parseSubqueryOpRest(lhs, []*ast.Node{nStr(name)}, tok) + lastLevel = precOp + lhsIsRow = false + continue + } + nonassoc(precLike) + p.next() + kind, name := ast.A_Expr_Kind_AEXPR_LIKE, "~~" + if tok.Kind == ast.Token_ILIKE { + kind, name = ast.A_Expr_Kind_AEXPR_ILIKE, "~~*" + } + rhs := p.parseAExpr(precEscape) + if p.have(ast.Token_ESCAPE) { + esc := p.parseAExpr(precEscape) + fc := makeFuncCall(SystemFuncName("like_escape"), + []*ast.Node{rhs, esc}, ast.CoercionForm_COERCE_EXPLICIT_CALL, tok.Start) + rhs = nFuncCall(fc) + } + lhs = nAExpr(makeSimpleA_Expr(kind, name, lhs, rhs, tok.Start)) + lhsIsRow = false + continue + + case ast.Token_SIMILAR: + if precLike < minPrec { + return lhs + } + // a_expr SIMILAR TO a_expr [ESCAPE a_expr] %prec SIMILAR. SIMILAR + // without TO exists only inside substr_list; leave it unconsumed + // there so the SUBSTRING production can use it. + if p.inSubstrList && p.peekN(1).Kind != ast.Token_TO { + return lhs + } + nonassoc(precLike) + p.next() + p.expect(ast.Token_TO) + rhs := p.parseAExpr(precEscape) + args := []*ast.Node{rhs} + if p.have(ast.Token_ESCAPE) { + args = append(args, p.parseAExpr(precEscape)) + } + fc := makeFuncCall(SystemFuncName("similar_to_escape"), args, + ast.CoercionForm_COERCE_EXPLICIT_CALL, tok.Start) + lhs = nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_SIMILAR, "~", lhs, nFuncCall(fc), tok.Start)) + lhsIsRow = false + continue + + case ast.Token_NOT_LA: + if precLike < minPrec { + return lhs + } + nonassoc(precLike) + p.next() + lhs = p.parseNotLaRest(lhs, tok) + lhsIsRow = false + continue + + case ast.Token_BETWEEN: + if precLike < minPrec { + return lhs + } + nonassoc(precLike) + p.next() + lhs = p.parseBetweenRest(lhs, tok, false) + lhsIsRow = false + continue + + case ast.Token_IN_P: + if precLike < minPrec { + return lhs + } + nonassoc(precLike) + p.next() + lhs = p.parseInRest(lhs, tok, false) + lhsIsRow = false + continue + + case ast.Token_IS, ast.Token_ISNULL, ast.Token_NOTNULL: + if precIs < minPrec { + return lhs + } + nonassoc(precIs) + lhs = p.parseIsRest(lhs, start) + lhsIsRow = false + continue + + case ast.Token_OVERLAPS: + // a_expr: row OVERLAPS row + if !lhsIsRow { + return lhs + } + p.next() + lhs = p.parseOverlapsRest(lhs, start, tok) + lhsIsRow = false + lastLevel = 0 + continue + + default: + return lhs + } + } +} + +// mathOpSubquery handles "a_expr subquery_Op sub_type ..." when the +// operator is one of the explicitly-known MathOps (all_Op includes them). +func (p *parser) mathOpSubquery(lhs *ast.Node, tok lexer.Token) (*ast.Node, bool) { + if p.subTypeAfterOp(1) == ast.SubLinkType_SUB_LINK_TYPE_UNDEFINED { + return nil, false + } + p.next() + return p.parseSubqueryOpRest(lhs, []*ast.Node{nStr(mathOpName(tok))}, tok), true +} + +// mathOpInfix consumes the current (explicitly-known) operator token and +// builds makeSimpleA_Expr(AEXPR_OP, op, lhs, rhs, @2). +func (p *parser) mathOpInfix(lhs *ast.Node, rhsPrec int) *ast.Node { + tok := p.next() + return nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_OP, mathOpName(tok), lhs, p.parseAExpr(rhsPrec), tok.Start)) +} + +// mathOpName is gram.y's MathOp: the operator's canonical spelling. +func mathOpName(tok lexer.Token) string { + switch tok.Kind { + case ast.Token_LESS_EQUALS: + return "<=" + case ast.Token_GREATER_EQUALS: + return ">=" + case ast.Token_NOT_EQUALS: + // scan.l normalizes != to <> before the grammar ever sees it. + return "<>" + default: + return string(rune(tok.Kind)) + } +} + +// subTypeAfterOp checks whether the token n ahead is ANY/SOME/ALL — the +// marker of the a_expr subquery_Op sub_type productions. +func (p *parser) subTypeAfterOp(n int) ast.SubLinkType { + switch p.kindN(n) { + case ast.Token_ANY, ast.Token_SOME: + return ast.SubLinkType_ANY_SUBLINK + case ast.Token_ALL: + return ast.SubLinkType_ALL_SUBLINK + } + return ast.SubLinkType_SUB_LINK_TYPE_UNDEFINED +} + +// parseSubqueryOpRest parses the remainder of +// +// a_expr subquery_Op sub_type select_with_parens %prec Op +// a_expr subquery_Op sub_type '(' a_expr ')' %prec Op +// +// with the operator (and its location token) already consumed. +func (p *parser) parseSubqueryOpRest(lhs *ast.Node, opName []*ast.Node, opTok lexer.Token) *ast.Node { + var subType ast.SubLinkType + switch p.next().Kind { + case ast.Token_ANY, ast.Token_SOME: + subType = ast.SubLinkType_ANY_SUBLINK + default: + subType = ast.SubLinkType_ALL_SUBLINK + } + if sel, ok := p.trySelectWithParens(); ok { + return nSubLink(&ast.SubLink{ + SubLinkType: subType, + Testexpr: lhs, + OperName: opName, + Subselect: sel, + Location: opTok.Start, + }) + } + p.expect(ast.Token('(')) + rhs := p.parseAExpr(0) + p.expect(ast.Token(')')) + kind := ast.A_Expr_Kind_AEXPR_OP_ANY + if subType == ast.SubLinkType_ALL_SUBLINK { + kind = ast.A_Expr_Kind_AEXPR_OP_ALL + } + return nAExpr(makeA_Expr(kind, opName, lhs, rhs, opTok.Start)) +} + +// parseNotLaRest handles the a_expr NOT_LA {BETWEEN,IN_P,LIKE,ILIKE,SIMILAR} +// productions; the NOT_LA token is already consumed and passed as notTok. +func (p *parser) parseNotLaRest(lhs *ast.Node, notTok lexer.Token) *ast.Node { + switch p.peek().Kind { + case ast.Token_BETWEEN: + p.next() + return p.parseBetweenRest(lhs, notTok, true) + case ast.Token_IN_P: + p.next() + return p.parseInRest(lhs, notTok, true) + case ast.Token_LIKE, ast.Token_ILIKE: + opTok := p.next() + kind, name := ast.A_Expr_Kind_AEXPR_LIKE, "!~~" + if opTok.Kind == ast.Token_ILIKE { + kind, name = ast.A_Expr_Kind_AEXPR_ILIKE, "!~~*" + } + if sub := p.subTypeAfterOp(0); sub != ast.SubLinkType_SUB_LINK_TYPE_UNDEFINED { + // a_expr subquery_Op(NOT_LA LIKE/ILIKE) sub_type ... + return p.parseSubqueryOpRest(lhs, []*ast.Node{nStr(name)}, notTok) + } + rhs := p.parseAExpr(precEscape) + if p.have(ast.Token_ESCAPE) { + esc := p.parseAExpr(precEscape) + fc := makeFuncCall(SystemFuncName("like_escape"), + []*ast.Node{rhs, esc}, ast.CoercionForm_COERCE_EXPLICIT_CALL, notTok.Start) + rhs = nFuncCall(fc) + } + return nAExpr(makeSimpleA_Expr(kind, name, lhs, rhs, notTok.Start)) + case ast.Token_SIMILAR: + p.next() + p.expect(ast.Token_TO) + rhs := p.parseAExpr(precEscape) + args := []*ast.Node{rhs} + if p.have(ast.Token_ESCAPE) { + args = append(args, p.parseAExpr(precEscape)) + } + fc := makeFuncCall(SystemFuncName("similar_to_escape"), args, + ast.CoercionForm_COERCE_EXPLICIT_CALL, notTok.Start) + return nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_SIMILAR, "!~", lhs, nFuncCall(fc), notTok.Start)) + } + p.syntaxErrorAt() + return nil +} + +// parseBetweenRest handles [NOT_LA] BETWEEN [SYMMETRIC|ASYMMETRIC] b_expr AND +// a_expr; opTok is the BETWEEN (or NOT) token for the node location. +func (p *parser) parseBetweenRest(lhs *ast.Node, opTok lexer.Token, not bool) *ast.Node { + symmetric := false + if p.have(ast.Token_SYMMETRIC) { + symmetric = true + } else { + p.have(ast.Token_ASYMMETRIC) // opt_asymmetric + } + low := p.parseBExpr(0) + p.expect(ast.Token_AND) + high := p.parseAExpr(precLike + 1) + kind := ast.A_Expr_Kind_AEXPR_BETWEEN + name := "BETWEEN" + switch { + case not && symmetric: + kind, name = ast.A_Expr_Kind_AEXPR_NOT_BETWEEN_SYM, "NOT BETWEEN SYMMETRIC" + case not: + kind, name = ast.A_Expr_Kind_AEXPR_NOT_BETWEEN, "NOT BETWEEN" + case symmetric: + kind, name = ast.A_Expr_Kind_AEXPR_BETWEEN_SYM, "BETWEEN SYMMETRIC" + } + return nAExpr(makeSimpleA_Expr(kind, name, + lhs, nList([]*ast.Node{low, high}), opTok.Start)) +} + +// parseInRest handles a_expr [NOT_LA] IN_P in_expr. +func (p *parser) parseInRest(lhs *ast.Node, opTok lexer.Token, not bool) *ast.Node { + // gram.y: in_expr: select_with_parens | '(' expr_list ')' + if sel, ok := p.trySelectWithParens(); ok { + n := &ast.SubLink{ + SubLinkType: ast.SubLinkType_ANY_SUBLINK, + Testexpr: lhs, + Subselect: sel, + Location: opTok.Start, + } + if not { + // NOT (foo = ANY (subquery)), NOT at same parse location + return makeNotExpr(nSubLink(n), opTok.Start) + } + return nSubLink(n) + } + p.expect(ast.Token('(')) + list := p.parseExprList() + p.expect(ast.Token(')')) + name := "=" + if not { + name = "<>" + } + return nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_IN, name, lhs, nList(list), opTok.Start)) +} + +// parseIsRest handles the postfix IS/ISNULL/NOTNULL family. exprStart is the +// token that began the a_expr (for the SQL/JSON predicate's location). +func (p *parser) parseIsRest(lhs *ast.Node, exprStart lexer.Token) *ast.Node { + tok := p.next() + switch tok.Kind { + case ast.Token_ISNULL: + // a_expr ISNULL + return nNullTest(&ast.NullTest{Arg: lhs, Nulltesttype: ast.NullTestType_IS_NULL, Location: tok.Start}) + case ast.Token_NOTNULL: + // a_expr NOTNULL + return nNullTest(&ast.NullTest{Arg: lhs, Nulltesttype: ast.NullTestType_IS_NOT_NULL, Location: tok.Start}) + } + + // tok is IS + not := false + if p.peek().Kind == ast.Token_NOT { + p.next() + not = true + } + boolTest := func(t ast.BoolTestType) *ast.Node { + p.next() + return nBooleanTest(&ast.BooleanTest{Arg: lhs, Booltesttype: t, Location: tok.Start}) + } + switch p.peek().Kind { + case ast.Token_NULL_P: + p.next() + t := ast.NullTestType_IS_NULL + if not { + t = ast.NullTestType_IS_NOT_NULL + } + return nNullTest(&ast.NullTest{Arg: lhs, Nulltesttype: t, Location: tok.Start}) + case ast.Token_TRUE_P: + if not { + return boolTest(ast.BoolTestType_IS_NOT_TRUE) + } + return boolTest(ast.BoolTestType_IS_TRUE) + case ast.Token_FALSE_P: + if not { + return boolTest(ast.BoolTestType_IS_NOT_FALSE) + } + return boolTest(ast.BoolTestType_IS_FALSE) + case ast.Token_UNKNOWN: + if not { + return boolTest(ast.BoolTestType_IS_NOT_UNKNOWN) + } + return boolTest(ast.BoolTestType_IS_UNKNOWN) + case ast.Token_DISTINCT: + // a_expr IS [NOT] DISTINCT FROM a_expr %prec IS + p.next() + p.expect(ast.Token_FROM) + rhs := p.parseAExpr(precCmp) + kind := ast.A_Expr_Kind_AEXPR_DISTINCT + if not { + kind = ast.A_Expr_Kind_AEXPR_NOT_DISTINCT + } + return nAExpr(makeSimpleA_Expr(kind, "=", lhs, rhs, tok.Start)) + case ast.Token_DOCUMENT_P: + // a_expr IS [NOT] DOCUMENT_P %prec IS + p.next() + x := makeXmlExpr(ast.XmlExprOp_IS_DOCUMENT, "", nil, []*ast.Node{lhs}, tok.Start) + if not { + return makeNotExpr(x, tok.Start) + } + return x + case ast.Token_NORMALIZED: + p.next() + fc := nFuncCall(makeFuncCall(SystemFuncName("is_normalized"), + []*ast.Node{lhs}, ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + if not { + return makeNotExpr(fc, tok.Start) + } + return fc + case ast.Token_NFC, ast.Token_NFD, ast.Token_NFKC, ast.Token_NFKD: + nf := p.next() + p.expect(ast.Token_NORMALIZED) + fc := nFuncCall(makeFuncCall(SystemFuncName("is_normalized"), + []*ast.Node{lhs, makeStringConst(unicodeNormalForm(nf), nf.Start)}, + ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + if not { + return makeNotExpr(fc, tok.Start) + } + return fc + case ast.Token_JSON: + // a_expr IS [NOT] json_predicate_type_constraint + // json_key_uniqueness_constraint_opt %prec IS + p.next() + itemType := ast.JsonValueType_JS_TYPE_ANY + switch p.peek().Kind { + case ast.Token_VALUE_P: + p.next() + case ast.Token_ARRAY: + p.next() + itemType = ast.JsonValueType_JS_TYPE_ARRAY + case ast.Token_OBJECT_P: + p.next() + itemType = ast.JsonValueType_JS_TYPE_OBJECT + case ast.Token_SCALAR: + p.next() + itemType = ast.JsonValueType_JS_TYPE_SCALAR + } + unique := p.parseJsonKeyUniquenessOpt() + format := makeJsonFormat(ast.JsonFormatType_JS_FORMAT_DEFAULT, ast.JsonEncoding_JS_ENC_DEFAULT, -1) + pred := makeJsonIsPredicate(lhs, format, itemType, unique, exprStart.Start) + if not { + return makeNotExpr(pred, exprStart.Start) + } + return pred + } + p.syntaxErrorAt() + return nil +} + +// unicodeNormalForm is gram.y's unicode_normal_form values. +func unicodeNormalForm(tok lexer.Token) string { + switch tok.Kind { + case ast.Token_NFC: + return "NFC" + case ast.Token_NFD: + return "NFD" + case ast.Token_NFKC: + return "NFKC" + default: + return "NFKD" + } +} + +// parseOverlapsRest finishes a_expr: row OVERLAPS row. The left row has been +// parsed into a RowExpr; both sides contribute their raw argument lists. +func (p *parser) parseOverlapsRest(lhs *ast.Node, lhsStart, opTok lexer.Token) *ast.Node { + larg := lhs.GetRowExpr().Args + if len(larg) != 2 { + p.ereport("base_yyparse", "wrong number of parameters on left side of OVERLAPS expression", lhsStart.Start) + } + rstart := p.peek() + rhs, isRow := p.parseCExprEx() + if !isRow { + p.syntaxError(rstart) + } + rarg := rhs.GetRowExpr().Args + if len(rarg) != 2 { + p.ereport("base_yyparse", "wrong number of parameters on right side of OVERLAPS expression", rstart.Start) + } + return nFuncCall(makeFuncCall(SystemFuncName("overlaps"), + append(append([]*ast.Node{}, larg...), rarg...), + ast.CoercionForm_COERCE_SQL_SYNTAX, opTok.Start)) +} + +// parseBExpr is gram.y's b_expr: the restricted ladder without AND, OR, NOT, +// the LIKE/BETWEEN/IN family, and most IS forms. +func (p *parser) parseBExpr(minPrec int) *ast.Node { + start := p.peek() + var lhs *ast.Node + + switch start.Kind { + case ast.Token('+'): + p.next() + lhs = nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_OP, "+", nil, p.parseBExpr(precUminus), start.Start)) + case ast.Token('-'): + p.next() + lhs = doNegate(p.parseBExpr(precUminus), start.Start) + case ast.Token_Op: + p.next() + lhs = nAExpr(makeA_Expr(ast.A_Expr_Kind_AEXPR_OP, []*ast.Node{nStr(start.Str)}, nil, p.parseBExpr(precOp+1), start.Start)) + case ast.Token_OPERATOR: + name := p.parseQualOp() + lhs = nAExpr(makeA_Expr(ast.A_Expr_Kind_AEXPR_OP, name, nil, p.parseBExpr(precOp+1), start.Start)) + default: + lhs, _ = p.parseCExprEx() + } + + lastLevel := 0 + for { + tok := p.peek() + switch tok.Kind { + case ast.Token_TYPECAST: + p.next() + lhs = makeTypeCast(lhs, p.parseTypename(), tok.Start) + continue + case ast.Token('^'): + if precExp < minPrec { + return lhs + } + lhs = p.bMathOpInfix(lhs, precExp+1) + continue + case ast.Token('*'), ast.Token('/'), ast.Token('%'): + if precMul < minPrec { + return lhs + } + lhs = p.bMathOpInfix(lhs, precMul+1) + continue + case ast.Token('+'), ast.Token('-'): + if precAdd < minPrec { + return lhs + } + lhs = p.bMathOpInfix(lhs, precAdd+1) + continue + case ast.Token('<'), ast.Token('>'), ast.Token('='), + ast.Token_LESS_EQUALS, ast.Token_GREATER_EQUALS, ast.Token_NOT_EQUALS: + if precCmp < minPrec { + return lhs + } + if lastLevel == precCmp { + p.syntaxErrorAt() + } + lastLevel = precCmp + lhs = p.bMathOpInfix(lhs, precCmp+1) + continue + case ast.Token_Op: + if precOp < minPrec { + return lhs + } + p.next() + lhs = nAExpr(makeA_Expr(ast.A_Expr_Kind_AEXPR_OP, []*ast.Node{nStr(tok.Str)}, lhs, p.parseBExpr(precOp+1), tok.Start)) + continue + case ast.Token_OPERATOR: + if precOp < minPrec { + return lhs + } + name := p.parseQualOp() + lhs = nAExpr(makeA_Expr(ast.A_Expr_Kind_AEXPR_OP, name, lhs, p.parseBExpr(precOp+1), tok.Start)) + continue + case ast.Token_IS: + // b_expr IS [NOT] DISTINCT FROM b_expr %prec IS + // b_expr IS [NOT] DOCUMENT_P %prec IS + if precIs < minPrec { + return lhs + } + if lastLevel == precIs { + p.syntaxErrorAt() + } + next := p.kindN(1) + notOff := 0 + if next == ast.Token_NOT { + notOff = 1 + next = p.kindN(2) + } + if next != ast.Token_DISTINCT && next != ast.Token_DOCUMENT_P { + // IS NULL etc. are not part of b_expr; leave IS unconsumed. + return lhs + } + lastLevel = precIs + p.next() // IS + not := notOff == 1 + if not { + p.next() // NOT + } + if p.have(ast.Token_DISTINCT) { + p.expect(ast.Token_FROM) + rhs := p.parseBExpr(precCmp) + kind := ast.A_Expr_Kind_AEXPR_DISTINCT + if not { + kind = ast.A_Expr_Kind_AEXPR_NOT_DISTINCT + } + lhs = nAExpr(makeSimpleA_Expr(kind, "=", lhs, rhs, tok.Start)) + } else { + p.expect(ast.Token_DOCUMENT_P) + x := makeXmlExpr(ast.XmlExprOp_IS_DOCUMENT, "", nil, []*ast.Node{lhs}, tok.Start) + if not { + x = makeNotExpr(x, tok.Start) + } + lhs = x + } + continue + default: + return lhs + } + } +} + +func (p *parser) bMathOpInfix(lhs *ast.Node, rhsPrec int) *ast.Node { + tok := p.next() + return nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_OP, mathOpName(tok), lhs, p.parseBExpr(rhsPrec), tok.Start)) +} + +// parseQualOp is gram.y's qual_Op: Op | OPERATOR '(' any_operator ')'. The +// current token must be Op or OPERATOR; consumes it. +func (p *parser) parseQualOp() []*ast.Node { + tok := p.next() + if tok.Kind == ast.Token_Op { + return []*ast.Node{nStr(tok.Str)} + } + // OPERATOR '(' any_operator ')' + p.expect(ast.Token('(')) + name := p.parseAnyOperator() + p.expect(ast.Token(')')) + return name +} + +// parseAnyOperator is gram.y's any_operator: all_Op | ColId '.' any_operator. +func (p *parser) parseAnyOperator() []*ast.Node { + var names []*ast.Node + for isColIdToken(p.peek()) { + names = append(names, nStr(p.next().Str)) + p.expect(ast.Token('.')) + } + op := p.parseAllOp() + return append(names, nStr(op)) +} + +// parseAllOp is gram.y's all_Op: Op | MathOp. +func (p *parser) parseAllOp() string { + tok := p.peek() + switch tok.Kind { + case ast.Token_Op: + p.next() + return tok.Str + case ast.Token('+'), ast.Token('-'), ast.Token('*'), ast.Token('/'), + ast.Token('%'), ast.Token('^'), ast.Token('<'), ast.Token('>'), + ast.Token('='), ast.Token_LESS_EQUALS, ast.Token_GREATER_EQUALS, + ast.Token_NOT_EQUALS: + p.next() + return mathOpName(tok) + } + p.syntaxErrorAt() + return "" +} + +// parseExprList is gram.y's expr_list. +func (p *parser) parseExprList() []*ast.Node { + list := []*ast.Node{p.parseAExpr(0)} + for p.have(ast.Token(',')) { + list = append(list, p.parseAExpr(0)) + } + return list +} diff --git a/internal/parse/func.go b/internal/parse/func.go new file mode 100644 index 0000000..c538178 --- /dev/null +++ b/internal/parse/func.go @@ -0,0 +1,1525 @@ +package parse + +import ( + "strings" + + "github.com/sqlc-dev/oliphant/ast" + "github.com/sqlc-dev/oliphant/internal/lexer" +) + +// parseFuncExprKeyword handles every c_expr alternative headed by a keyword +// with special function-like syntax (func_expr_common_subexpr, the SQL value +// functions, JSON aggregates) plus the ConstTypename-headed constants. +// Returns nil when the keyword doesn't commit here — the caller falls back +// to the generic name path (columnref / function call / const cast). +func (p *parser) parseFuncExprKeyword(tok lexer.Token) *ast.Node { + paren := p.kindN(1) == ast.Token('(') + svf := func(op ast.SQLValueFunctionOp, precN ast.SQLValueFunctionOp) *ast.Node { + // CURRENT_TIME ['(' Iconst ')'] and friends + p.next() + typmod := int32(-1) + op2 := op + if precN != ast.SQLValueFunctionOp_SQLVALUE_FUNCTION_OP_UNDEFINED && p.have(ast.Token('(')) { + typmod = p.iconst() + p.expect(ast.Token(')')) + op2 = precN + } + return makeSQLValueFunction(op2, typmod, tok.Start) + } + noParen := ast.SQLValueFunctionOp_SQLVALUE_FUNCTION_OP_UNDEFINED + + switch tok.Kind { + case ast.Token_COLLATION: + // func_expr_common_subexpr: COLLATION FOR '(' a_expr ')' + if p.kindN(1) != ast.Token_FOR { + return nil + } + p.next() + p.next() + p.expect(ast.Token('(')) + arg := p.parseAExpr(0) + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall(SystemFuncName("pg_collation_for"), + []*ast.Node{arg}, ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + + case ast.Token_CURRENT_DATE: + return svf(ast.SQLValueFunctionOp_SVFOP_CURRENT_DATE, noParen) + case ast.Token_CURRENT_TIME: + return svf(ast.SQLValueFunctionOp_SVFOP_CURRENT_TIME, ast.SQLValueFunctionOp_SVFOP_CURRENT_TIME_N) + case ast.Token_CURRENT_TIMESTAMP: + return svf(ast.SQLValueFunctionOp_SVFOP_CURRENT_TIMESTAMP, ast.SQLValueFunctionOp_SVFOP_CURRENT_TIMESTAMP_N) + case ast.Token_LOCALTIME: + return svf(ast.SQLValueFunctionOp_SVFOP_LOCALTIME, ast.SQLValueFunctionOp_SVFOP_LOCALTIME_N) + case ast.Token_LOCALTIMESTAMP: + return svf(ast.SQLValueFunctionOp_SVFOP_LOCALTIMESTAMP, ast.SQLValueFunctionOp_SVFOP_LOCALTIMESTAMP_N) + case ast.Token_CURRENT_ROLE: + return svf(ast.SQLValueFunctionOp_SVFOP_CURRENT_ROLE, noParen) + case ast.Token_CURRENT_USER: + return svf(ast.SQLValueFunctionOp_SVFOP_CURRENT_USER, noParen) + case ast.Token_SESSION_USER: + return svf(ast.SQLValueFunctionOp_SVFOP_SESSION_USER, noParen) + case ast.Token_USER: + return svf(ast.SQLValueFunctionOp_SVFOP_USER, noParen) + case ast.Token_CURRENT_CATALOG: + return svf(ast.SQLValueFunctionOp_SVFOP_CURRENT_CATALOG, noParen) + case ast.Token_CURRENT_SCHEMA: + // CURRENT_SCHEMA is a type_func_name keyword (unlike the other SQL + // value functions): current_schema() is a plain function call. + if paren { + return nil + } + return svf(ast.SQLValueFunctionOp_SVFOP_CURRENT_SCHEMA, noParen) + case ast.Token_SYSTEM_USER: + p.next() + return nFuncCall(makeFuncCall(SystemFuncName("system_user"), nil, + ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + + case ast.Token_CAST: + // CAST '(' a_expr AS Typename ')' + p.next() + p.expect(ast.Token('(')) + arg := p.parseAExpr(0) + p.expect(ast.Token_AS) + t := p.parseTypename() + p.expect(ast.Token(')')) + return makeTypeCast(arg, t, tok.Start) + + case ast.Token_EXTRACT: + // EXTRACT '(' extract_list ')' + if !paren { + return nil + } + p.next() + p.next() + args := p.parseExtractList() + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall(SystemFuncName("extract"), args, + ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + + case ast.Token_NORMALIZE: + // NORMALIZE '(' a_expr [',' unicode_normal_form] ')' + if !paren { + return nil + } + p.next() + p.next() + args := []*ast.Node{p.parseAExpr(0)} + if p.have(ast.Token(',')) { + nf := p.peek() + switch nf.Kind { + case ast.Token_NFC, ast.Token_NFD, ast.Token_NFKC, ast.Token_NFKD: + p.next() + default: + p.syntaxErrorAt() + } + args = append(args, makeStringConst(unicodeNormalForm(nf), nf.Start)) + } + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall(SystemFuncName("normalize"), args, + ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + + case ast.Token_OVERLAY: + // OVERLAY '(' overlay_list ')' | OVERLAY '(' func_arg_list_opt ')' + if !paren { + return nil + } + p.next() + p.next() + return p.parseOverlayRest(tok) + + case ast.Token_POSITION: + // POSITION '(' position_list ')' + if !paren { + return nil + } + p.next() + p.next() + var args []*ast.Node + if p.kind() != ast.Token(')') { + b1 := p.parseBExpr(0) + p.expect(ast.Token_IN_P) + b2 := p.parseBExpr(0) + args = []*ast.Node{b2, b1} + } else { + // POSITION() with no args is not in the grammar; error at ')'. + p.syntaxErrorAt() + } + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall(SystemFuncName("position"), args, + ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + + case ast.Token_SUBSTRING: + if !paren { + return nil + } + p.next() + p.next() + return p.parseSubstringRest(tok) + + case ast.Token_TREAT: + // TREAT '(' a_expr AS Typename ')' + if !paren { + return nil + } + p.next() + p.next() + arg := p.parseAExpr(0) + p.expect(ast.Token_AS) + t := p.parseTypename() + p.expect(ast.Token(')')) + last := t.Names[len(t.Names)-1] + return nFuncCall(makeFuncCall(SystemFuncName(asString(last).Sval), + []*ast.Node{arg}, ast.CoercionForm_COERCE_EXPLICIT_CALL, tok.Start)) + + case ast.Token_TRIM: + // TRIM '(' [BOTH|LEADING|TRAILING] trim_list ')' + if !paren { + return nil + } + p.next() + p.next() + name := "btrim" + switch p.kind() { + case ast.Token_BOTH: + p.next() + case ast.Token_LEADING: + p.next() + name = "ltrim" + case ast.Token_TRAILING: + p.next() + name = "rtrim" + } + args := p.parseTrimList() + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall(SystemFuncName(name), args, + ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + + case ast.Token_NULLIF: + // NULLIF '(' a_expr ',' a_expr ')' + if !paren { + return nil + } + p.next() + p.next() + a := p.parseAExpr(0) + p.expect(ast.Token(',')) + b := p.parseAExpr(0) + p.expect(ast.Token(')')) + return nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_NULLIF, "=", a, b, tok.Start)) + + case ast.Token_COALESCE: + if !paren { + return nil + } + p.next() + p.next() + args := p.parseExprList() + p.expect(ast.Token(')')) + return nCoalesceExpr(&ast.CoalesceExpr{Args: args, Location: tok.Start}) + + case ast.Token_GREATEST, ast.Token_LEAST: + if !paren { + return nil + } + p.next() + p.next() + args := p.parseExprList() + p.expect(ast.Token(')')) + op := ast.MinMaxOp_IS_GREATEST + if tok.Kind == ast.Token_LEAST { + op = ast.MinMaxOp_IS_LEAST + } + return nMinMaxExpr(&ast.MinMaxExpr{Op: op, Args: args, Location: tok.Start}) + + case ast.Token_XMLCONCAT: + if !paren { + return nil + } + p.next() + p.next() + args := p.parseExprList() + p.expect(ast.Token(')')) + return makeXmlExpr(ast.XmlExprOp_IS_XMLCONCAT, "", nil, args, tok.Start) + + case ast.Token_XMLELEMENT: + if !paren { + return nil + } + p.next() + p.next() + return p.parseXmlElementRest(tok) + + case ast.Token_XMLEXISTS: + // XMLEXISTS '(' c_expr xmlexists_argument ')' + if !paren { + return nil + } + p.next() + p.next() + c, _ := p.parseCExprEx() + arg := p.parseXmlExistsArgument() + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall(SystemFuncName("xmlexists"), + []*ast.Node{c, arg}, ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + + case ast.Token_XMLFOREST: + if !paren { + return nil + } + p.next() + p.next() + args := p.parseXmlAttributeList() + p.expect(ast.Token(')')) + return makeXmlExpr(ast.XmlExprOp_IS_XMLFOREST, "", args, nil, tok.Start) + + case ast.Token_XMLPARSE: + // XMLPARSE '(' document_or_content a_expr xml_whitespace_option ')' + if !paren { + return nil + } + p.next() + p.next() + opt := p.parseDocumentOrContent() + arg := p.parseAExpr(0) + ws := false + if p.have(ast.Token_PRESERVE) { + p.expect(ast.Token_WHITESPACE_P) + ws = true + } else if p.have(ast.Token_STRIP_P) { + p.expect(ast.Token_WHITESPACE_P) + } + p.expect(ast.Token(')')) + x := makeXmlExpr(ast.XmlExprOp_IS_XMLPARSE, "", nil, + []*ast.Node{arg, makeBoolAConst(ws, -1)}, tok.Start) + x.GetXmlExpr().Xmloption = opt + return x + + case ast.Token_XMLPI: + // XMLPI '(' NAME_P ColLabel [',' a_expr] ')' + if !paren { + return nil + } + p.next() + p.next() + p.expect(ast.Token_NAME_P) + name := p.colLabel() + var args []*ast.Node + if p.have(ast.Token(',')) { + args = []*ast.Node{p.parseAExpr(0)} + } + p.expect(ast.Token(')')) + return makeXmlExpr(ast.XmlExprOp_IS_XMLPI, name, nil, args, tok.Start) + + case ast.Token_XMLROOT: + // XMLROOT '(' a_expr ',' xml_root_version opt_xml_root_standalone ')' + if !paren { + return nil + } + p.next() + p.next() + arg := p.parseAExpr(0) + p.expect(ast.Token(',')) + p.expect(ast.Token_VERSION_P) + var version *ast.Node + if p.have(ast.Token_NO) { + p.expect(ast.Token_VALUE_P) + version = makeNullAConst(-1) + } else { + version = p.parseAExpr(0) + } + // opt_xml_root_standalone (XML_STANDALONE_* per xml.h) + standalone := makeIntConst(3, -1) // XML_STANDALONE_OMITTED + if p.have(ast.Token(',')) { + p.expect(ast.Token_STANDALONE_P) + switch { + case p.have(ast.Token_YES_P): + standalone = makeIntConst(0, -1) // XML_STANDALONE_YES + case p.have(ast.Token_NO): + if p.have(ast.Token_VALUE_P) { + standalone = makeIntConst(2, -1) // XML_STANDALONE_NO_VALUE + } else { + standalone = makeIntConst(1, -1) // XML_STANDALONE_NO + } + default: + p.syntaxErrorAt() + } + } + p.expect(ast.Token(')')) + return makeXmlExpr(ast.XmlExprOp_IS_XMLROOT, "", nil, + []*ast.Node{arg, version, standalone}, tok.Start) + + case ast.Token_XMLSERIALIZE: + // XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename + // xml_indent_option ')' + if !paren { + return nil + } + p.next() + p.next() + opt := p.parseDocumentOrContent() + arg := p.parseAExpr(0) + p.expect(ast.Token_AS) + t := p.parseSimpleTypename() + indent := false + if p.have(ast.Token_INDENT) { + indent = true + } else if p.kind() == ast.Token_NO && p.kindN(1) == ast.Token_INDENT { + p.next() + p.next() + } + p.expect(ast.Token(')')) + return nXmlSerialize(&ast.XmlSerialize{ + Xmloption: opt, + Expr: arg, + TypeName: t, + Indent: indent, + Location: tok.Start, + }) + + case ast.Token_MERGE_ACTION: + // MERGE_ACTION '(' ')' + if !paren { + return nil + } + p.next() + p.next() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_MergeSupportFunc{MergeSupportFunc: &ast.MergeSupportFunc{ + Msftype: 25, // TEXTOID + Location: tok.Start, + }}} + + case ast.Token_JSON_TABLE, ast.Token_XMLTABLE: + // Table functions exist only in FROM; in an expression the '(' has + // no production, so bison fails right there. + if paren { + p.next() + p.syntaxErrorAt() + } + return nil + + case ast.Token_JSON_OBJECT: + if !paren { + return nil + } + p.next() + p.next() + return p.parseJsonObjectRest(tok) + + case ast.Token_JSON_ARRAY: + if !paren { + return nil + } + p.next() + p.next() + return p.parseJsonArrayRest(tok) + + case ast.Token_JSON: + // JSON '(' json_value_expr json_key_uniqueness_constraint_opt ')' + // (JsonType constants are handled by parseConstTypenameExpr.) + if paren { + p.next() + p.next() + expr := p.parseJsonValueExpr() + unique := p.parseJsonKeyUniquenessOpt() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonParseExpr{JsonParseExpr: &ast.JsonParseExpr{ + Expr: expr.GetJsonValueExpr(), + UniqueKeys: unique, + Location: tok.Start, + }}} + } + return p.parseConstTypenameExpr() + + case ast.Token_JSON_SCALAR: + if !paren { + return nil + } + p.next() + p.next() + arg := p.parseAExpr(0) + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonScalarExpr{JsonScalarExpr: &ast.JsonScalarExpr{ + Expr: arg, + Location: tok.Start, + }}} + + case ast.Token_JSON_SERIALIZE: + if !paren { + return nil + } + p.next() + p.next() + expr := p.parseJsonValueExpr() + output := p.parseJsonReturningOpt() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonSerializeExpr{JsonSerializeExpr: &ast.JsonSerializeExpr{ + Expr: expr.GetJsonValueExpr(), + Output: output, + Location: tok.Start, + }}} + + case ast.Token_JSON_QUERY, ast.Token_JSON_EXISTS, ast.Token_JSON_VALUE: + if !paren { + return nil + } + p.next() + p.next() + return p.parseJsonFuncExprRest(tok) + + case ast.Token_JSON_OBJECTAGG, ast.Token_JSON_ARRAYAGG: + // func_expr: json_aggregate_func filter_clause over_clause + if !paren { + return nil + } + agg := p.parseJsonAggregateFunc(tok) + filter := p.parseFilterClause() + over := p.parseOverClause() + var ctor *ast.JsonAggConstructor + if oa, ok := agg.Node.(*ast.Node_JsonObjectAgg); ok { + ctor = oa.JsonObjectAgg.Constructor + } else { + ctor = agg.GetJsonArrayAgg().Constructor + } + ctor.AggFilter = filter + ctor.Over = over + return agg + + // ConstTypename-headed constants. + case ast.Token_INT_P, ast.Token_INTEGER, ast.Token_SMALLINT, ast.Token_BIGINT, + ast.Token_REAL, ast.Token_FLOAT_P, ast.Token_DOUBLE_P, ast.Token_DECIMAL_P, + ast.Token_DEC, ast.Token_NUMERIC, ast.Token_BOOLEAN_P, ast.Token_BIT, + ast.Token_CHARACTER, ast.Token_CHAR_P, ast.Token_VARCHAR, ast.Token_NCHAR, + ast.Token_NATIONAL, ast.Token_TIMESTAMP, ast.Token_TIME, ast.Token_INTERVAL: + return p.parseConstTypenameExpr() + } + return nil +} + +// parseDocumentOrContent is gram.y's document_or_content. +func (p *parser) parseDocumentOrContent() ast.XmlOptionType { + switch p.kind() { + case ast.Token_DOCUMENT_P: + p.next() + return ast.XmlOptionType_XMLOPTION_DOCUMENT + case ast.Token_CONTENT_P: + p.next() + return ast.XmlOptionType_XMLOPTION_CONTENT + } + p.syntaxErrorAt() + return 0 +} + +// parseXmlElementRest parses XMLELEMENT's argument list after '('. +func (p *parser) parseXmlElementRest(tok lexer.Token) *ast.Node { + p.expect(ast.Token_NAME_P) + name := p.colLabel() + var namedArgs, args []*ast.Node + if p.have(ast.Token(',')) { + if p.kind() == ast.Token_XMLATTRIBUTES { + // xml_attributes: XMLATTRIBUTES '(' xml_attribute_list ')' + p.next() + p.expect(ast.Token('(')) + namedArgs = p.parseXmlAttributeList() + p.expect(ast.Token(')')) + if p.have(ast.Token(',')) { + args = p.parseExprList() + } + } else { + args = p.parseExprList() + } + } + p.expect(ast.Token(')')) + return makeXmlExpr(ast.XmlExprOp_IS_XMLELEMENT, name, namedArgs, args, tok.Start) +} + +// parseXmlAttributeList is gram.y's xml_attribute_list. +func (p *parser) parseXmlAttributeList() []*ast.Node { + list := []*ast.Node{p.parseXmlAttributeEl()} + for p.have(ast.Token(',')) { + list = append(list, p.parseXmlAttributeEl()) + } + return list +} + +// parseXmlAttributeEl is gram.y's xml_attribute_el: a_expr [AS ColLabel]. +func (p *parser) parseXmlAttributeEl() *ast.Node { + start := p.peek() + val := p.parseAExpr(0) + rt := &ast.ResTarget{Val: val, Location: start.Start} + if p.have(ast.Token_AS) { + rt.Name = p.colLabel() + } + return nResTarget(rt) +} + +// parseXmlExistsArgument is gram.y's xmlexists_argument. +func (p *parser) parseXmlExistsArgument() *ast.Node { + p.expect(ast.Token_PASSING) + p.parseXmlPassingMech() + c, _ := p.parseCExprEx() + p.parseXmlPassingMech() + return c +} + +// parseXmlPassingMech is gram.y's xml_passing_mech: BY REF_P | BY VALUE_P. +func (p *parser) parseXmlPassingMech() { + if p.kind() == ast.Token_BY { + p.next() + if !p.have(ast.Token_REF_P) { + p.expect(ast.Token_VALUE_P) + } + } +} + +// parseExtractList is gram.y's extract_list: extract_arg FROM a_expr. +func (p *parser) parseExtractList() []*ast.Node { + tok := p.peek() + var first *ast.Node + switch tok.Kind { + case ast.Token_IDENT: + p.next() + first = makeStringConst(tok.Str, tok.Start) + case ast.Token_YEAR_P, ast.Token_MONTH_P, ast.Token_DAY_P, + ast.Token_HOUR_P, ast.Token_MINUTE_P, ast.Token_SECOND_P: + p.next() + first = makeStringConst(tok.Str, tok.Start) + case ast.Token_SCONST: + p.next() + first = makeStringConst(tok.Str, tok.Start) + case ast.Token_PARAM: + p.next() + first = makeParamRef(tok.Ival, tok.Start) + default: + p.syntaxErrorAt() + } + p.expect(ast.Token_FROM) + a := p.parseAExpr(0) + return []*ast.Node{first, a} +} + +// parseOverlayRest parses OVERLAY's two forms after the '(': +// overlay_list (PLACING syntax) vs func_arg_list_opt. +func (p *parser) parseOverlayRest(tok lexer.Token) *ast.Node { + if p.kind() == ast.Token(')') { + // OVERLAY '(' ')' — the func_arg_list_opt empty case + p.next() + return nFuncCall(makeFuncCall([]*ast.Node{nStr("overlay")}, nil, + ast.CoercionForm_COERCE_EXPLICIT_CALL, tok.Start)) + } + mark := p.mark() + var args []*ast.Node + err := p.try(func() { + a := p.parseAExpr(0) + if p.kind() != ast.Token_PLACING { + p.syntaxErrorAt() + } + p.next() + b := p.parseAExpr(0) + p.expect(ast.Token_FROM) + c := p.parseAExpr(0) + args = []*ast.Node{a, b, c} + if p.have(ast.Token_FOR) { + args = append(args, p.parseAExpr(0)) + } + p.expect(ast.Token(')')) + }) + if err == nil { + return nFuncCall(makeFuncCall(SystemFuncName("overlay"), args, + ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + } + p.reset(mark) + fargs := p.parseFuncArgList() + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall([]*ast.Node{nStr("overlay")}, fargs, + ast.CoercionForm_COERCE_EXPLICIT_CALL, tok.Start)) +} + +// parseSubstringRest parses SUBSTRING's two forms after the '(': +// substr_list vs func_arg_list_opt. +func (p *parser) parseSubstringRest(tok lexer.Token) *ast.Node { + if p.kind() == ast.Token(')') { + p.next() + return nFuncCall(makeFuncCall([]*ast.Node{nStr("substring")}, nil, + ast.CoercionForm_COERCE_EXPLICIT_CALL, tok.Start)) + } + mark := p.mark() + var args []*ast.Node + err := p.try(func() { + args = p.parseSubstrList() + p.expect(ast.Token(')')) + }) + if err == nil { + return nFuncCall(makeFuncCall(SystemFuncName("substring"), args, + ast.CoercionForm_COERCE_SQL_SYNTAX, tok.Start)) + } + p.reset(mark) + fargs := p.parseFuncArgList() + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall([]*ast.Node{nStr("substring")}, fargs, + ast.CoercionForm_COERCE_EXPLICIT_CALL, tok.Start)) +} + +// parseSubstrList is gram.y's substr_list. +func (p *parser) parseSubstrList() []*ast.Node { + oldFlag := p.inSubstrList + p.inSubstrList = true + defer func() { p.inSubstrList = oldFlag }() + + a := p.parseAExpr(0) + switch p.kind() { + case ast.Token_FROM: + p.next() + b := p.parseAExpr(0) + if p.have(ast.Token_FOR) { + c := p.parseAExpr(0) + return []*ast.Node{a, b, c} + } + return []*ast.Node{a, b} + case ast.Token_FOR: + p.next() + b := p.parseAExpr(0) + if p.have(ast.Token_FROM) { + c := p.parseAExpr(0) + return []*ast.Node{a, c, b} + } + // a_expr FOR a_expr: forcibly cast the length to int4 + return []*ast.Node{a, makeIntConst(1, -1), + makeTypeCast(b, SystemTypeName("int4"), -1)} + case ast.Token_SIMILAR: + p.next() + b := p.parseAExpr(0) + p.expect(ast.Token_ESCAPE) + c := p.parseAExpr(0) + return []*ast.Node{a, b, c} + } + p.syntaxErrorAt() + return nil +} + +// parseTrimList is gram.y's trim_list. +func (p *parser) parseTrimList() []*ast.Node { + if p.have(ast.Token_FROM) { + return p.parseExprList() + } + a := p.parseAExpr(0) + if p.have(ast.Token_FROM) { + rest := p.parseExprList() + return append(rest, a) + } + list := []*ast.Node{a} + for p.have(ast.Token(',')) { + list = append(list, p.parseAExpr(0)) + } + return list +} + +// parseFuncApplicationRest is gram.y's func_application with the func_name +// already parsed and '(' as the current token — plus the AexprConst +// "func_name '(' func_arg_list opt_sort_clause ')' Sconst/PARAM" forms, +// which can only be told apart after the closing paren, and the func_expr +// decorations (WITHIN GROUP, FILTER, OVER). +func (p *parser) parseFuncApplicationRest(name []*ast.Node, nameTok lexer.Token) *ast.Node { + p.expect(ast.Token('(')) + fc := makeFuncCall(name, nil, ast.CoercionForm_COERCE_EXPLICIT_CALL, nameTok.Start) + var sortTok lexer.Token + switch { + case p.have(ast.Token(')')): + // func_name '(' ')' + case p.have(ast.Token('*')): + // func_name '(' '*' ')' + p.expect(ast.Token(')')) + fc.AggStar = true + case p.kind() == ast.Token_ALL && !p.nextStartsNamedArg(1): + p.next() + fc.Args = p.parseFuncArgList() + sortTok = p.peek() + fc.AggOrder = p.parseOptSortClause() + p.expect(ast.Token(')')) + case p.kind() == ast.Token_DISTINCT: + p.next() + fc.Args = p.parseFuncArgList() + sortTok = p.peek() + fc.AggOrder = p.parseOptSortClause() + p.expect(ast.Token(')')) + fc.AggDistinct = true + case p.kind() == ast.Token_VARIADIC: + p.next() + fc.Args = []*ast.Node{p.parseFuncArgExpr()} + fc.FuncVariadic = true + sortTok = p.peek() + fc.AggOrder = p.parseOptSortClause() + p.expect(ast.Token(')')) + default: + fc.Args = []*ast.Node{p.parseFuncArgExpr()} + for p.have(ast.Token(',')) { + if p.have(ast.Token_VARIADIC) { + fc.Args = append(fc.Args, p.parseFuncArgExpr()) + fc.FuncVariadic = true + break + } + fc.Args = append(fc.Args, p.parseFuncArgExpr()) + } + sortTok = p.peek() + fc.AggOrder = p.parseOptSortClause() + p.expect(ast.Token(')')) + } + + // AexprConst: func_name '(' func_arg_list opt_sort_clause ')' Sconst — + // only for the plain-args form (no star/distinct/variadic markers). + if (p.kind() == ast.Token_SCONST || p.kind() == ast.Token_PARAM) && + !fc.AggStar && !fc.AggDistinct && !fc.FuncVariadic && len(fc.Args) > 0 { + for _, arg := range fc.Args { + if na, ok := arg.Node.(*ast.Node_NamedArgExpr); ok { + p.ereport("base_yyparse", "type modifier cannot have parameter name", na.NamedArgExpr.Location) + } + } + if fc.AggOrder != nil { + p.ereport("base_yyparse", "type modifier cannot have ORDER BY", sortTok.Start) + } + t := makeTypeNameFromNameList(name) + t.Typmods = fc.Args + t.Location = nameTok.Start + if p.kind() == ast.Token_SCONST { + s := p.next() + return makeStringConstCast(s.Str, s.Start, t) + } + prm := p.next() + return makeParamRefCast(prm.Ival, prm.Start, t) + } + + return p.parseFuncExprDecorations(fc) +} + +// parseFuncExprDecorations is func_expr's within_group_clause filter_clause +// over_clause tail. +func (p *parser) parseFuncExprDecorations(fc *ast.FuncCall) *ast.Node { + // within_group_clause: WITHIN GROUP_P '(' sort_clause ')' + if p.kind() == ast.Token_WITHIN { + wtok := p.peek() + p.next() + p.expect(ast.Token_GROUP_P) + p.expect(ast.Token('(')) + order := p.parseSortClause() + p.expect(ast.Token(')')) + if fc.AggOrder != nil { + p.ereport("base_yyparse", "cannot use multiple ORDER BY clauses with WITHIN GROUP", wtok.Start) + } + if fc.AggDistinct { + p.ereport("base_yyparse", "cannot use DISTINCT with WITHIN GROUP", wtok.Start) + } + if fc.FuncVariadic { + p.ereport("base_yyparse", "cannot use VARIADIC with WITHIN GROUP", wtok.Start) + } + fc.AggOrder = order + fc.AggWithinGroup = true + } + fc.AggFilter = p.parseFilterClause() + fc.Over = p.parseOverClause() + return nFuncCall(fc) +} + +// parseFilterClause is gram.y's filter_clause. +func (p *parser) parseFilterClause() *ast.Node { + if p.kind() != ast.Token_FILTER || p.kindN(1) != ast.Token('(') { + return nil + } + p.next() + p.next() + p.expect(ast.Token_WHERE) + f := p.parseAExpr(0) + p.expect(ast.Token(')')) + return f +} + +// nextStartsNamedArg reports whether the token at offset n starts a +// param_name COLON_EQUALS/EQUALS_GREATER named argument. (Used to keep ALL +// from being misread when it is a quoted identifier... it cannot be; ALL is +// reserved. Kept for symmetry.) +func (p *parser) nextStartsNamedArg(n int) bool { + return false +} + +// parseFuncArgList is gram.y's func_arg_list. +func (p *parser) parseFuncArgList() []*ast.Node { + list := []*ast.Node{p.parseFuncArgExpr()} + for p.have(ast.Token(',')) { + list = append(list, p.parseFuncArgExpr()) + } + return list +} + +// parseFuncArgExpr is gram.y's func_arg_expr: a_expr | param_name +// COLON_EQUALS/EQUALS_GREATER a_expr. +func (p *parser) parseFuncArgExpr() *ast.Node { + tok := p.peek() + if isTypeFunctionNameToken(tok) { + next := p.kindN(1) + if next == ast.Token_COLON_EQUALS || next == ast.Token_EQUALS_GREATER { + p.next() + p.next() + arg := p.parseAExpr(0) + return nNamedArgExpr(&ast.NamedArgExpr{ + Name: tok.Str, + Arg: arg, + Argnumber: -1, + Location: tok.Start, + }) + } + } + return p.parseAExpr(0) +} + +// parseOverClause is gram.y's over_clause. +func (p *parser) parseOverClause() *ast.WindowDef { + if !p.have(ast.Token_OVER) { + return nil + } + if p.kind() == ast.Token('(') { + return p.parseWindowSpecification() + } + tok := p.peek() + name := p.colId() + return &ast.WindowDef{ + Name: name, + FrameOptions: frameOptionDefaults, + Location: tok.Start, + } +} + +// Window frame option bits (parsenodes.h FRAMEOPTION_*). +const ( + frameOptionNondefault = 0x00001 + frameOptionRange = 0x00002 + frameOptionRows = 0x00004 + frameOptionGroups = 0x00008 + frameOptionBetween = 0x00010 + frameOptionStartUnboundedPreceding = 0x00020 + frameOptionEndUnboundedPreceding = 0x00040 + frameOptionStartUnboundedFollowing = 0x00080 + frameOptionEndUnboundedFollowing = 0x00100 + frameOptionStartCurrentRow = 0x00200 + frameOptionEndCurrentRow = 0x00400 + frameOptionStartOffsetPreceding = 0x00800 + frameOptionEndOffsetPreceding = 0x01000 + frameOptionStartOffsetFollowing = 0x02000 + frameOptionEndOffsetFollowing = 0x04000 + frameOptionExcludeCurrentRow = 0x08000 + frameOptionExcludeGroup = 0x10000 + frameOptionExcludeTies = 0x20000 + + frameOptionDefaults = frameOptionRange | + frameOptionStartUnboundedPreceding | frameOptionEndCurrentRow +) + +// parseWindowSpecification is gram.y's window_specification. +func (p *parser) parseWindowSpecification() *ast.WindowDef { + tok := p.expect(ast.Token('(')) + w := &ast.WindowDef{Location: tok.Start} + + // opt_existing_window_name: a ColId — but not one of the clause-starting + // keywords, which have IDENT precedence so the empty production wins. + if isColIdToken(p.peek()) { + switch p.kind() { + case ast.Token_PARTITION, ast.Token_RANGE, ast.Token_ROWS, ast.Token_GROUPS: + default: + w.Refname = p.colId() + } + } + if p.kind() == ast.Token_PARTITION { + p.next() + p.expect(ast.Token_BY) + w.PartitionClause = p.parseExprList() + } + w.OrderClause = p.parseOptSortClause() + + // opt_frame_clause + frame := p.parseOptFrameClause() + w.FrameOptions = frame.FrameOptions + w.StartOffset = frame.StartOffset + w.EndOffset = frame.EndOffset + p.expect(ast.Token(')')) + return w +} + +// parseOptFrameClause is gram.y's opt_frame_clause; returns a WindowDef +// carrying only frameOptions/startOffset/endOffset. +func (p *parser) parseOptFrameClause() *ast.WindowDef { + var mode int32 + switch p.kind() { + case ast.Token_RANGE: + mode = frameOptionRange + case ast.Token_ROWS: + mode = frameOptionRows + case ast.Token_GROUPS: + mode = frameOptionGroups + default: + return &ast.WindowDef{FrameOptions: frameOptionDefaults} + } + p.next() + n := p.parseFrameExtent() + n.FrameOptions |= frameOptionNondefault | mode + // opt_window_exclusion_clause + if p.have(ast.Token_EXCLUDE) { + switch { + case p.have(ast.Token_CURRENT_P): + p.expect(ast.Token_ROW) + n.FrameOptions |= frameOptionExcludeCurrentRow + case p.have(ast.Token_GROUP_P): + n.FrameOptions |= frameOptionExcludeGroup + case p.have(ast.Token_TIES): + n.FrameOptions |= frameOptionExcludeTies + case p.have(ast.Token_NO): + p.expect(ast.Token_OTHERS) + default: + p.syntaxErrorAt() + } + } + return n +} + +// parseFrameExtent is gram.y's frame_extent. +func (p *parser) parseFrameExtent() *ast.WindowDef { + if p.kind() == ast.Token_BETWEEN { + p.next() + btok := p.peek() + n1 := p.parseFrameBound() + p.expect(ast.Token_AND) + etok := p.peek() + n2 := p.parseFrameBound() + frameOptions := n1.FrameOptions + // shift converts START_ options to END_ options + frameOptions |= n2.FrameOptions << 1 + frameOptions |= frameOptionBetween + if frameOptions&frameOptionStartUnboundedFollowing != 0 { + p.ereport("base_yyparse", "frame start cannot be UNBOUNDED FOLLOWING", btok.Start) + } + if frameOptions&frameOptionEndUnboundedPreceding != 0 { + p.ereport("base_yyparse", "frame end cannot be UNBOUNDED PRECEDING", etok.Start) + } + if frameOptions&frameOptionStartCurrentRow != 0 && + frameOptions&frameOptionEndOffsetPreceding != 0 { + p.ereport("base_yyparse", "frame starting from current row cannot have preceding rows", etok.Start) + } + if frameOptions&frameOptionStartOffsetFollowing != 0 && + frameOptions&(frameOptionEndOffsetPreceding|frameOptionEndCurrentRow) != 0 { + p.ereport("base_yyparse", "frame starting from following row cannot have preceding rows", etok.Start) + } + n1.FrameOptions = frameOptions + n1.EndOffset = n2.StartOffset + return n1 + } + tok := p.peek() + n := p.parseFrameBound() + if n.FrameOptions&frameOptionStartUnboundedFollowing != 0 { + p.ereport("base_yyparse", "frame start cannot be UNBOUNDED FOLLOWING", tok.Start) + } + if n.FrameOptions&frameOptionStartOffsetFollowing != 0 { + p.ereport("base_yyparse", "frame starting from following row cannot end with current row", tok.Start) + } + n.FrameOptions |= frameOptionEndCurrentRow + return n +} + +// parseFrameBound is gram.y's frame_bound. +func (p *parser) parseFrameBound() *ast.WindowDef { + switch p.kind() { + case ast.Token_UNBOUNDED: + p.next() + switch { + case p.have(ast.Token_PRECEDING): + return &ast.WindowDef{FrameOptions: frameOptionStartUnboundedPreceding} + case p.have(ast.Token_FOLLOWING): + return &ast.WindowDef{FrameOptions: frameOptionStartUnboundedFollowing} + } + p.syntaxErrorAt() + case ast.Token_CURRENT_P: + if p.kindN(1) == ast.Token_ROW { + p.next() + p.next() + return &ast.WindowDef{FrameOptions: frameOptionStartCurrentRow} + } + } + offset := p.parseAExpr(0) + switch { + case p.have(ast.Token_PRECEDING): + return &ast.WindowDef{FrameOptions: frameOptionStartOffsetPreceding, StartOffset: offset} + case p.have(ast.Token_FOLLOWING): + return &ast.WindowDef{FrameOptions: frameOptionStartOffsetFollowing, StartOffset: offset} + } + p.syntaxErrorAt() + return nil +} + +// --- SQL/JSON --- + +// makefuncs.c: makeJsonFormat +func makeJsonFormat(t ast.JsonFormatType, encoding ast.JsonEncoding, location int32) *ast.JsonFormat { + return &ast.JsonFormat{FormatType: t, Encoding: encoding, Location: location} +} + +// makefuncs.c: makeJsonValueExpr +func makeJsonValueExpr(raw *ast.Node, formatted *ast.Node, format *ast.JsonFormat) *ast.Node { + return &ast.Node{Node: &ast.Node_JsonValueExpr{JsonValueExpr: &ast.JsonValueExpr{ + RawExpr: raw, + FormattedExpr: formatted, + Format: format, + }}} +} + +// makefuncs.c: makeJsonBehavior +func makeJsonBehavior(btype ast.JsonBehaviorType, expr *ast.Node, location int32) *ast.JsonBehavior { + return &ast.JsonBehavior{Btype: btype, Expr: expr, Location: location} +} + +// makefuncs.c: makeJsonKeyValue +func makeJsonKeyValue(key, value *ast.Node) *ast.Node { + return &ast.Node{Node: &ast.Node_JsonKeyValue{JsonKeyValue: &ast.JsonKeyValue{ + Key: key, + Value: value.GetJsonValueExpr(), + }}} +} + +// makefuncs.c: makeJsonIsPredicate +func makeJsonIsPredicate(expr *ast.Node, format *ast.JsonFormat, itemType ast.JsonValueType, uniqueKeys bool, location int32) *ast.Node { + return &ast.Node{Node: &ast.Node_JsonIsPredicate{JsonIsPredicate: &ast.JsonIsPredicate{ + Expr: expr, + Format: format, + ItemType: itemType, + UniqueKeys: uniqueKeys, + Location: location, + }}} +} + +// parseJsonValueExpr is gram.y's json_value_expr: a_expr +// json_format_clause_opt. +func (p *parser) parseJsonValueExpr() *ast.Node { + expr := p.parseAExpr(0) + format := p.parseJsonFormatClauseOpt() + return makeJsonValueExpr(expr, nil, format) +} + +// parseJsonFormatClauseOpt is gram.y's json_format_clause_opt. +func (p *parser) parseJsonFormatClauseOpt() *ast.JsonFormat { + if p.kind() != ast.Token_FORMAT_LA { + return makeJsonFormat(ast.JsonFormatType_JS_FORMAT_DEFAULT, ast.JsonEncoding_JS_ENC_DEFAULT, -1) + } + return p.parseJsonFormatClause() +} + +// parseJsonFormatClause is gram.y's json_format_clause: FORMAT_LA JSON +// [ENCODING name]. +func (p *parser) parseJsonFormatClause() *ast.JsonFormat { + tok := p.expect(ast.Token_FORMAT_LA) + p.expect(ast.Token_JSON) + if p.have(ast.Token_ENCODING) { + name := p.name() + var enc ast.JsonEncoding + switch strings.ToLower(name) { + case "utf8": + enc = ast.JsonEncoding_JS_ENC_UTF8 + case "utf16": + enc = ast.JsonEncoding_JS_ENC_UTF16 + case "utf32": + enc = ast.JsonEncoding_JS_ENC_UTF32 + default: + // gram.y: this ereport carries no parser_errposition. + p.ereport("base_yyparse", "unrecognized JSON encoding: "+name, -1) + } + return makeJsonFormat(ast.JsonFormatType_JS_FORMAT_JSON, enc, tok.Start) + } + return makeJsonFormat(ast.JsonFormatType_JS_FORMAT_JSON, ast.JsonEncoding_JS_ENC_DEFAULT, tok.Start) +} + +// parseJsonKeyUniquenessOpt is gram.y's json_key_uniqueness_constraint_opt. +func (p *parser) parseJsonKeyUniquenessOpt() bool { + switch p.kind() { + case ast.Token_WITH: + if p.kindN(1) != ast.Token_UNIQUE { + return false + } + p.next() + p.next() + p.have(ast.Token_KEYS) + return true + case ast.Token_WITHOUT: + if p.kindN(1) != ast.Token_UNIQUE { + return false + } + p.next() + p.next() + p.have(ast.Token_KEYS) + return false + } + return false +} + +// parseJsonReturningOpt is gram.y's json_returning_clause_opt. +func (p *parser) parseJsonReturningOpt() *ast.JsonOutput { + if !p.have(ast.Token_RETURNING) { + return nil + } + t := p.parseTypename() + format := p.parseJsonFormatClauseOpt() + return &ast.JsonOutput{ + TypeName: t, + Returning: &ast.JsonReturning{Format: format}, + } +} + +// parseJsonObjectRest parses JSON_OBJECT's three forms after the '('. +func (p *parser) parseJsonObjectRest(tok lexer.Token) *ast.Node { + // JSON_OBJECT '(' json_returning_clause_opt ')' + if p.kind() == ast.Token(')') || p.kind() == ast.Token_RETURNING { + output := p.parseJsonReturningOpt() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonObjectConstructor{JsonObjectConstructor: &ast.JsonObjectConstructor{ + Output: output, + Location: tok.Start, + }}} + } + + // Distinguish json_name_and_value_list from legacy func_arg_list: try + // the standard form first, mirroring the LALR states that keep both + // alive until a ':' / VALUE_P or a ',' / ')' decides. + mark := p.mark() + var node *ast.Node + err := p.try(func() { + exprs := []*ast.Node{p.parseJsonNameAndValue()} + for p.have(ast.Token(',')) { + exprs = append(exprs, p.parseJsonNameAndValue()) + } + absentOnNull := p.parseJsonObjectNullClauseOpt(false) + unique := p.parseJsonKeyUniquenessOpt() + output := p.parseJsonReturningOpt() + p.expect(ast.Token(')')) + node = &ast.Node{Node: &ast.Node_JsonObjectConstructor{JsonObjectConstructor: &ast.JsonObjectConstructor{ + Exprs: exprs, + AbsentOnNull: absentOnNull, + Unique: unique, + Output: output, + Location: tok.Start, + }}} + }) + if err == nil { + return node + } + p.reset(mark) + + // Legacy json_object(func_arg_list) + args := p.parseFuncArgList() + p.expect(ast.Token(')')) + return nFuncCall(makeFuncCall(SystemFuncName("json_object"), args, + ast.CoercionForm_COERCE_EXPLICIT_CALL, tok.Start)) +} + +// parseJsonNameAndValue is gram.y's json_name_and_value. +func (p *parser) parseJsonNameAndValue() *ast.Node { + key := p.parseAExpr(0) + if !p.have(ast.Token(':')) { + p.expect(ast.Token_VALUE_P) + } + val := p.parseJsonValueExpr() + return makeJsonKeyValue(key, val) +} + +// parseJsonObjectNullClauseOpt is json_object_constructor_null_clause_opt / +// json_array_constructor_null_clause_opt (they differ only in the default). +func (p *parser) parseJsonObjectNullClauseOpt(def bool) bool { + switch p.kind() { + case ast.Token_NULL_P: + if p.kindN(1) == ast.Token_ON && p.kindN(2) == ast.Token_NULL_P { + p.next() + p.next() + p.next() + return false + } + case ast.Token_ABSENT: + if p.kindN(1) == ast.Token_ON && p.kindN(2) == ast.Token_NULL_P { + p.next() + p.next() + p.next() + return true + } + } + return def +} + +// parseJsonArrayRest parses JSON_ARRAY's forms after the '('. +func (p *parser) parseJsonArrayRest(tok lexer.Token) *ast.Node { + // JSON_ARRAY '(' json_returning_clause_opt ')' + if p.kind() == ast.Token(')') || p.kind() == ast.Token_RETURNING { + output := p.parseJsonReturningOpt() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonArrayConstructor{JsonArrayConstructor: &ast.JsonArrayConstructor{ + AbsentOnNull: true, + Output: output, + Location: tok.Start, + }}} + } + + // JSON_ARRAY '(' select_no_parens ... ')' + if p.looksLikeSelectAheadHereJson() { + query := p.parseSelectNoParens() + format := p.parseJsonFormatClauseOpt() + output := p.parseJsonReturningOpt() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonArrayQueryConstructor{JsonArrayQueryConstructor: &ast.JsonArrayQueryConstructor{ + Query: query, + Format: format, + AbsentOnNull: true, + Output: output, + Location: tok.Start, + }}} + } + + exprs := []*ast.Node{p.parseJsonValueExpr()} + for p.have(ast.Token(',')) { + exprs = append(exprs, p.parseJsonValueExpr()) + } + absentOnNull := p.parseJsonObjectNullClauseOpt(true) + output := p.parseJsonReturningOpt() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonArrayConstructor{JsonArrayConstructor: &ast.JsonArrayConstructor{ + Exprs: exprs, + AbsentOnNull: absentOnNull, + Output: output, + Location: tok.Start, + }}} +} + +// looksLikeSelectAheadHereJson: JSON_ARRAY(select ...) takes a bare +// select_no_parens (no wrapping parens), so just check the current token. +func (p *parser) looksLikeSelectAheadHereJson() bool { + switch p.kind() { + case ast.Token_SELECT, ast.Token_VALUES, ast.Token_TABLE, + ast.Token_WITH, ast.Token_WITH_LA: + return true + } + return false +} + +// parseJsonAggregateFunc is gram.y's json_aggregate_func; current token is +// JSON_OBJECTAGG/JSON_ARRAYAGG. +func (p *parser) parseJsonAggregateFunc(tok lexer.Token) *ast.Node { + p.next() + p.expect(ast.Token('(')) + if tok.Kind == ast.Token_JSON_OBJECTAGG { + arg := p.parseJsonNameAndValue() + absentOnNull := p.parseJsonObjectNullClauseOpt(false) + unique := p.parseJsonKeyUniquenessOpt() + output := p.parseJsonReturningOpt() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonObjectAgg{JsonObjectAgg: &ast.JsonObjectAgg{ + Constructor: &ast.JsonAggConstructor{ + Output: output, + Location: tok.Start, + }, + Arg: arg.GetJsonKeyValue(), + AbsentOnNull: absentOnNull, + Unique: unique, + }}} + } + arg := p.parseJsonValueExpr() + var aggOrder []*ast.Node + if p.kind() == ast.Token_ORDER { + aggOrder = p.parseSortClauseKeyword() + } + absentOnNull := p.parseJsonObjectNullClauseOpt(true) + output := p.parseJsonReturningOpt() + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonArrayAgg{JsonArrayAgg: &ast.JsonArrayAgg{ + Constructor: &ast.JsonAggConstructor{ + Output: output, + AggOrder: aggOrder, + Location: tok.Start, + }, + Arg: arg.GetJsonValueExpr(), + AbsentOnNull: absentOnNull, + }}} +} + +// parseJsonFuncExprRest parses JSON_EXISTS/JSON_QUERY/JSON_VALUE after '('. +func (p *parser) parseJsonFuncExprRest(tok lexer.Token) *ast.Node { + // Wrapper/quotes are always emitted; their C zero values are + // JSW_UNSPEC / JS_QUOTES_UNSPEC. + n := &ast.JsonFuncExpr{ + Wrapper: ast.JsonWrapper_JSW_UNSPEC, + Quotes: ast.JsonQuotes_JS_QUOTES_UNSPEC, + Location: tok.Start, + } + ctx := p.parseJsonValueExpr() + n.ContextItem = ctx.GetJsonValueExpr() + p.expect(ast.Token(',')) + n.Pathspec = p.parseAExpr(0) + if p.have(ast.Token_PASSING) { + n.Passing = []*ast.Node{p.parseJsonArgument()} + for p.have(ast.Token(',')) { + n.Passing = append(n.Passing, p.parseJsonArgument()) + } + } + switch tok.Kind { + case ast.Token_JSON_EXISTS: + n.Op = ast.JsonExprOp_JSON_EXISTS_OP + // json_on_error_clause_opt + if b, on := p.parseJsonBehaviorClauseOpt(); on != nil || b != nil { + n.OnError = on + if b != nil { + // ON EMPTY is not accepted by JSON_EXISTS + p.syntaxErrorAt() + } + } + case ast.Token_JSON_QUERY: + n.Op = ast.JsonExprOp_JSON_QUERY_OP + n.Output = p.parseJsonReturningOpt() + n.Wrapper = p.parseJsonWrapperBehavior() + n.Quotes = p.parseJsonQuotesClauseOpt() + n.OnEmpty, n.OnError = p.parseJsonBehaviorClauseOpt() + case ast.Token_JSON_VALUE: + n.Op = ast.JsonExprOp_JSON_VALUE_OP + n.Output = p.parseJsonReturningOpt() + n.OnEmpty, n.OnError = p.parseJsonBehaviorClauseOpt() + } + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonFuncExpr{JsonFuncExpr: n}} +} + +// parseJsonArgument is gram.y's json_argument. +func (p *parser) parseJsonArgument() *ast.Node { + val := p.parseJsonValueExpr() + p.expect(ast.Token_AS) + name := p.colLabel() + return &ast.Node{Node: &ast.Node_JsonArgument{JsonArgument: &ast.JsonArgument{ + Val: val.GetJsonValueExpr(), + Name: name, + }}} +} + +// parseJsonWrapperBehavior is gram.y's json_wrapper_behavior. +func (p *parser) parseJsonWrapperBehavior() ast.JsonWrapper { + switch p.kind() { + case ast.Token_WITHOUT: + if p.kindN(1) == ast.Token_WRAPPER { + p.next() + p.next() + return ast.JsonWrapper_JSW_NONE + } + if p.kindN(1) == ast.Token_ARRAY && p.kindN(2) == ast.Token_WRAPPER { + p.next() + p.next() + p.next() + return ast.JsonWrapper_JSW_NONE + } + case ast.Token_WITH: + switch p.kindN(1) { + case ast.Token_WRAPPER: + p.next() + p.next() + return ast.JsonWrapper_JSW_UNCONDITIONAL + case ast.Token_ARRAY: + if p.kindN(2) == ast.Token_WRAPPER { + p.next() + p.next() + p.next() + return ast.JsonWrapper_JSW_UNCONDITIONAL + } + case ast.Token_CONDITIONAL, ast.Token_UNCONDITIONAL: + cond := p.kindN(1) == ast.Token_CONDITIONAL + i := 2 + if p.kindN(2) == ast.Token_ARRAY { + i = 3 + } + if p.kindN(i) == ast.Token_WRAPPER { + for j := 0; j <= i; j++ { + p.next() + } + if cond { + return ast.JsonWrapper_JSW_CONDITIONAL + } + return ast.JsonWrapper_JSW_UNCONDITIONAL + } + } + } + return ast.JsonWrapper_JSW_UNSPEC +} + +// parseJsonQuotesClauseOpt is gram.y's json_quotes_clause_opt. +func (p *parser) parseJsonQuotesClauseOpt() ast.JsonQuotes { + var q ast.JsonQuotes + switch p.kind() { + case ast.Token_KEEP: + q = ast.JsonQuotes_JS_QUOTES_KEEP + case ast.Token_OMIT: + q = ast.JsonQuotes_JS_QUOTES_OMIT + default: + return ast.JsonQuotes_JS_QUOTES_UNSPEC + } + if p.kindN(1) != ast.Token_QUOTES { + return ast.JsonQuotes_JS_QUOTES_UNSPEC + } + p.next() + p.next() + if p.kind() == ast.Token_ON && p.kindN(1) == ast.Token_SCALAR && p.kindN(2) == ast.Token_STRING_P { + p.next() + p.next() + p.next() + } + return q +} + +// parseJsonBehaviorClauseOpt is gram.y's json_behavior_clause_opt: returns +// (onEmpty, onError). +func (p *parser) parseJsonBehaviorClauseOpt() (*ast.JsonBehavior, *ast.JsonBehavior) { + b1 := p.parseJsonBehaviorOpt() + if b1 == nil { + return nil, nil + } + p.expect(ast.Token_ON) + if p.have(ast.Token_ERROR_P) { + return nil, b1 + } + p.expect(ast.Token_EMPTY_P) + b2 := p.parseJsonBehaviorOpt() + if b2 == nil { + return b1, nil + } + p.expect(ast.Token_ON) + p.expect(ast.Token_ERROR_P) + return b1, b2 +} + +// parseJsonBehaviorOpt parses json_behavior if the current token starts one. +func (p *parser) parseJsonBehaviorOpt() *ast.JsonBehavior { + tok := p.peek() + switch tok.Kind { + case ast.Token_DEFAULT: + p.next() + expr := p.parseAExpr(0) + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_DEFAULT, expr, tok.Start) + case ast.Token_ERROR_P: + p.next() + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_ERROR, nil, tok.Start) + case ast.Token_NULL_P: + p.next() + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_NULL, nil, tok.Start) + case ast.Token_TRUE_P: + p.next() + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_TRUE, nil, tok.Start) + case ast.Token_FALSE_P: + p.next() + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_FALSE, nil, tok.Start) + case ast.Token_UNKNOWN: + p.next() + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_UNKNOWN, nil, tok.Start) + case ast.Token_EMPTY_P: + p.next() + switch { + case p.have(ast.Token_ARRAY): + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_EMPTY_ARRAY, nil, tok.Start) + case p.have(ast.Token_OBJECT_P): + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_EMPTY_OBJECT, nil, tok.Start) + } + return makeJsonBehavior(ast.JsonBehaviorType_JSON_BEHAVIOR_EMPTY_ARRAY, nil, tok.Start) + } + return nil +} diff --git a/internal/parse/gram_support.go b/internal/parse/gram_support.go new file mode 100644 index 0000000..46b1180 --- /dev/null +++ b/internal/parse/gram_support.go @@ -0,0 +1,436 @@ +package parse + +import ( + "strings" + + "github.com/sqlc-dev/oliphant/ast" +) + +// Ports of the static support functions at the bottom of gram.y (and the few +// makefuncs.c helpers the actions use), same names, same node shapes. + +// makefuncs.c: makeFuncCall +func makeFuncCall(name []*ast.Node, args []*ast.Node, funcformat ast.CoercionForm, location int32) *ast.FuncCall { + return &ast.FuncCall{ + Funcname: name, + Args: args, + Funcformat: funcformat, + Location: location, + } +} + +// makefuncs.c: makeA_Expr (list-valued operator name) +func makeA_Expr(kind ast.A_Expr_Kind, name []*ast.Node, lexpr, rexpr *ast.Node, location int32) *ast.A_Expr { + return &ast.A_Expr{ + Kind: kind, + Name: name, + Lexpr: lexpr, + Rexpr: rexpr, + Location: location, + } +} + +// makefuncs.c: makeSimpleA_Expr +func makeSimpleA_Expr(kind ast.A_Expr_Kind, name string, lexpr, rexpr *ast.Node, location int32) *ast.A_Expr { + return makeA_Expr(kind, []*ast.Node{nStr(name)}, lexpr, rexpr, location) +} + +// makefuncs.c: makeBoolExpr +func makeBoolExpr(boolop ast.BoolExprType, args []*ast.Node, location int32) *ast.Node { + return nBoolExpr(&ast.BoolExpr{Boolop: boolop, Args: args, Location: location}) +} + +// makefuncs.c: makeRangeVar +func makeRangeVar(schemaname, relname string, location int32) *ast.RangeVar { + return &ast.RangeVar{ + Schemaname: schemaname, + Relname: relname, + Inh: true, + Relpersistence: "p", + Location: location, + } +} + +// makefuncs.c: makeTypeNameFromNameList +func makeTypeNameFromNameList(names []*ast.Node) *ast.TypeName { + return &ast.TypeName{Names: names, Typemod: -1, Location: -1} +} + +// gram.y: SystemFuncName +func SystemFuncName(name string) []*ast.Node { + return []*ast.Node{nStr("pg_catalog"), nStr(name)} +} + +// gram.y: SystemTypeName +func SystemTypeName(name string) *ast.TypeName { + return makeTypeNameFromNameList([]*ast.Node{nStr("pg_catalog"), nStr(name)}) +} + +// gram.y: makeColumnRef +func (p *parser) makeColumnRef(colname string, indirection []*ast.Node, location int32) *ast.Node { + c := &ast.ColumnRef{Location: location} + nfields := 0 + for i, el := range indirection { + if isAIndices(el) { + a := &ast.A_Indirection{} + if nfields == 0 { + c.Fields = []*ast.Node{nStr(colname)} + a.Indirection = p.check_indirection(indirection) + } else { + a.Indirection = p.check_indirection(indirection[nfields:]) + c.Fields = append([]*ast.Node{nStr(colname)}, indirection[:nfields]...) + } + a.Arg = nColumnRef(c) + return nAIndirection(a) + } + if isAStar(el) { + // We only allow '*' at the end of a ColumnRef + if i < len(indirection)-1 { + p.parserYyerror(`improper use of "*"`) + } + } + nfields++ + } + c.Fields = append([]*ast.Node{nStr(colname)}, indirection...) + return nColumnRef(c) +} + +// gram.y: check_indirection — only allow '*' at the end of the list. +func (p *parser) check_indirection(indirection []*ast.Node) []*ast.Node { + for i, el := range indirection { + if isAStar(el) && i < len(indirection)-1 { + p.parserYyerror(`improper use of "*"`) + } + } + return indirection +} + +// gram.y: check_func_name — reject subscripts and '*' from func_name. +func (p *parser) check_func_name(names []*ast.Node) []*ast.Node { + for _, n := range names { + if asString(n) == nil { + p.parserYyerror("syntax error") + } + } + return names +} + +// gram.y: check_qualified_name +func (p *parser) check_qualified_name(names []*ast.Node) { + for _, n := range names { + if asString(n) == nil { + p.parserYyerror("syntax error") + } + } +} + +// parserYyerror is parser_yyerror(msg): scanner_yyerror at the current +// lookahead token. +func (p *parser) parserYyerror(msg string) { + p.fail(p.filter.SyntaxErrorMsg(p.peek(), msg)) +} + +// gram.y: makeTypeCast +func makeTypeCast(arg *ast.Node, typename *ast.TypeName, location int32) *ast.Node { + return nTypeCast(&ast.TypeCast{Arg: arg, TypeName: typename, Location: location}) +} + +// gram.y: makeStringConst +func makeStringConst(str string, location int32) *ast.Node { + return nAConst(&ast.A_Const{ + Val: &ast.A_Const_Sval{Sval: &ast.String{Sval: str}}, + Location: location, + }) +} + +// gram.y: makeStringConstCast +func makeStringConstCast(str string, location int32, typename *ast.TypeName) *ast.Node { + return makeTypeCast(makeStringConst(str, location), typename, -1) +} + +// gram.y: makeIntConst +func makeIntConst(val int32, location int32) *ast.Node { + return nAConst(&ast.A_Const{ + Val: &ast.A_Const_Ival{Ival: &ast.Integer{Ival: val}}, + Location: location, + }) +} + +// gram.y: makeFloatConst +func makeFloatConst(str string, location int32) *ast.Node { + return nAConst(&ast.A_Const{ + Val: &ast.A_Const_Fval{Fval: &ast.Float{Fval: str}}, + Location: location, + }) +} + +// gram.y: makeBoolAConst +func makeBoolAConst(state bool, location int32) *ast.Node { + return nAConst(&ast.A_Const{ + Val: &ast.A_Const_Boolval{Boolval: &ast.Boolean{Boolval: state}}, + Location: location, + }) +} + +// gram.y: makeBitStringConst +func makeBitStringConst(str string, location int32) *ast.Node { + return nAConst(&ast.A_Const{ + Val: &ast.A_Const_Bsval{Bsval: &ast.BitString{Bsval: str}}, + Location: location, + }) +} + +// gram.y: makeNullAConst +func makeNullAConst(location int32) *ast.Node { + return nAConst(&ast.A_Const{Isnull: true, Location: location}) +} + +// gram.y: makeParamRef +func makeParamRef(number, location int32) *ast.Node { + return nParamRef(&ast.ParamRef{Number: number, Location: location}) +} + +// gram.y: makeParamRefCast +func makeParamRefCast(number, location int32, typename *ast.TypeName) *ast.Node { + return makeTypeCast(makeParamRef(number, location), typename, -1) +} + +// gram.y: doNegate +func doNegate(n *ast.Node, location int32) *ast.Node { + if con := asAConst(n); con != nil { + if iv, ok := con.Val.(*ast.A_Const_Ival); ok { + // report the constant's location as that of the '-' sign + con.Location = location + iv.Ival.Ival = -iv.Ival.Ival + return n + } + if fv, ok := con.Val.(*ast.A_Const_Fval); ok { + con.Location = location + doNegateFloat(fv.Fval) + return n + } + } + return nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_OP, "-", nil, n, location)) +} + +// gram.y: doNegateFloat +func doNegateFloat(v *ast.Float) { + oldval := v.Fval + oldval = strings.TrimPrefix(oldval, "+") + if strings.HasPrefix(oldval, "-") { + v.Fval = oldval[1:] // just strip the '-' + } else { + v.Fval = "-" + oldval + } +} + +// gram.y: makeAndExpr — flatten "a AND b AND c" on sight. +func makeAndExpr(lexpr, rexpr *ast.Node, location int32) *ast.Node { + if bl := asBoolExpr(lexpr); bl != nil && bl.Boolop == ast.BoolExprType_AND_EXPR { + bl.Args = append(bl.Args, rexpr) + return lexpr + } + return makeBoolExpr(ast.BoolExprType_AND_EXPR, []*ast.Node{lexpr, rexpr}, location) +} + +// gram.y: makeOrExpr — flatten "a OR b OR c" on sight. +func makeOrExpr(lexpr, rexpr *ast.Node, location int32) *ast.Node { + if bl := asBoolExpr(lexpr); bl != nil && bl.Boolop == ast.BoolExprType_OR_EXPR { + bl.Args = append(bl.Args, rexpr) + return lexpr + } + return makeBoolExpr(ast.BoolExprType_OR_EXPR, []*ast.Node{lexpr, rexpr}, location) +} + +// gram.y: makeNotExpr +func makeNotExpr(expr *ast.Node, location int32) *ast.Node { + return makeBoolExpr(ast.BoolExprType_NOT_EXPR, []*ast.Node{expr}, location) +} + +// gram.y: makeAArrayExpr +func makeAArrayExpr(elements []*ast.Node, location int32) *ast.Node { + return nAArrayExpr(&ast.A_ArrayExpr{Elements: elements, Location: location}) +} + +// gram.y: makeSQLValueFunction +func makeSQLValueFunction(op ast.SQLValueFunctionOp, typmod int32, location int32) *ast.Node { + return nSQLValueFunction(&ast.SQLValueFunction{Op: op, Typmod: typmod, Location: location}) +} + +// gram.y: makeXmlExpr — xmloption is only meaningful for XMLPARSE, but the +// C struct's zero value is XMLOPTION_DOCUMENT and the emitter writes enums +// unconditionally. +func makeXmlExpr(op ast.XmlExprOp, name string, namedArgs, args []*ast.Node, location int32) *ast.Node { + return nXmlExpr(&ast.XmlExpr{ + Op: op, + Name: name, + NamedArgs: namedArgs, + Args: args, + Xmloption: ast.XmlOptionType_XMLOPTION_DOCUMENT, + Location: location, + }) +} + +// gram.y: makeSetOp +func makeSetOp(op ast.SetOperation, all bool, larg, rarg *ast.Node) *ast.Node { + return nSelectStmt(&ast.SelectStmt{ + Op: op, + All: all, + Larg: asSelectStmt(larg), + Rarg: asSelectStmt(rarg), + LimitOption: ast.LimitOption_LIMIT_OPTION_DEFAULT, + }) +} + +// gram.y: makeRangeVarFromAnyName +func (p *parser) makeRangeVarFromAnyName(names []*ast.Node, position int32) *ast.RangeVar { + r := makeRangeVar("", "", position) + switch len(names) { + case 1: + r.Relname = asString(names[0]).Sval + case 2: + r.Schemaname = asString(names[0]).Sval + r.Relname = asString(names[1]).Sval + case 3: + r.Catalogname = asString(names[0]).Sval + r.Schemaname = asString(names[1]).Sval + r.Relname = asString(names[2]).Sval + default: + p.ereport("makeRangeVarFromAnyName", + "improper qualified name (too many dotted names): "+nameListToString(names), position) + } + return r +} + +// gram.y: makeRangeVarFromQualifiedName — relation_name '.' {...} forms. +func (p *parser) makeRangeVarFromQualifiedName(name string, namelist []*ast.Node, location int32) *ast.RangeVar { + p.check_qualified_name(namelist) + r := makeRangeVar("", "", location) + switch len(namelist) { + case 1: + r.Schemaname = name + r.Relname = asString(namelist[0]).Sval + case 2: + r.Catalogname = name + r.Schemaname = asString(namelist[0]).Sval + r.Relname = asString(namelist[1]).Sval + default: + all := append([]*ast.Node{nStr(name)}, namelist...) + p.ereport("makeRangeVarFromQualifiedName", + "improper qualified name (too many dotted names): "+nameListToString(all), location) + } + return r +} + +// namestrcpy/NameListToString (namespace.c): dotted, no quoting. +func nameListToString(names []*ast.Node) string { + var b strings.Builder + for i, n := range names { + if i > 0 { + b.WriteByte('.') + } + if s := asString(n); s != nil { + b.WriteString(s.Sval) + } else { + b.WriteString("*") // A_Star; matches NameListToString's else branch + } + } + return b.String() +} + +// nodeFuncs.c: exprLocation, for the node shapes the SELECT-milestone error +// paths can reach. +func exprLocation(n *ast.Node) int32 { + if n == nil { + return -1 + } + switch w := n.Node.(type) { + case *ast.Node_AConst: + return w.AConst.Location + case *ast.Node_ColumnRef: + return w.ColumnRef.Location + case *ast.Node_ParamRef: + return w.ParamRef.Location + case *ast.Node_AExpr: + return w.AExpr.Location + case *ast.Node_FuncCall: + return w.FuncCall.Location + case *ast.Node_BoolExpr: + return leftmostLoc(w.BoolExpr.Location, exprLocationList(w.BoolExpr.Args)) + case *ast.Node_TypeCast: + // TypeCast: use the argument's location if the cast has none + l := exprLocation(w.TypeCast.Arg) + if w.TypeCast.Location >= 0 && (l < 0 || w.TypeCast.Location < l) { + l = w.TypeCast.Location + } + return l + case *ast.Node_CollateClause: + return w.CollateClause.Location + case *ast.Node_SortBy: + // just use argument's location + return exprLocation(w.SortBy.Node) + case *ast.Node_WindowDef: + return w.WindowDef.Location + case *ast.Node_SubLink: + return w.SubLink.Location + case *ast.Node_CaseExpr: + return w.CaseExpr.Location + case *ast.Node_RowExpr: + return w.RowExpr.Location + case *ast.Node_AIndirection: + return exprLocation(w.AIndirection.Arg) + case *ast.Node_AArrayExpr: + return w.AArrayExpr.Location + case *ast.Node_List: + return exprLocationList(w.List.Items) + case *ast.Node_WithClause: + return w.WithClause.Location + case *ast.Node_NullTest: + return leftmostLoc(w.NullTest.Location, exprLocation(w.NullTest.Arg)) + case *ast.Node_BooleanTest: + return leftmostLoc(w.BooleanTest.Location, exprLocation(w.BooleanTest.Arg)) + case *ast.Node_SetToDefault: + return w.SetToDefault.Location + case *ast.Node_SqlvalueFunction: + return w.SqlvalueFunction.Location + case *ast.Node_MinMaxExpr: + return w.MinMaxExpr.Location + case *ast.Node_CoalesceExpr: + return w.CoalesceExpr.Location + case *ast.Node_GroupingFunc: + return w.GroupingFunc.Location + case *ast.Node_NamedArgExpr: + return leftmostLoc(w.NamedArgExpr.Location, exprLocation(w.NamedArgExpr.Arg)) + case *ast.Node_XmlExpr: + return w.XmlExpr.Location + case *ast.Node_XmlSerialize: + return w.XmlSerialize.Location + case *ast.Node_TypeName: + return w.TypeName.Location + } + return -1 +} + +// exprLocation over a list: leftmost location of the members (nodeFuncs.c +// treats a List by recursing over elements keeping the leftmost). +func exprLocationList(items []*ast.Node) int32 { + loc := int32(-1) + for _, it := range items { + loc = leftmostLoc(loc, exprLocation(it)) + } + return loc +} + +// nodeFuncs.c: leftmostLoc +func leftmostLoc(loc1, loc2 int32) int32 { + if loc1 < 0 { + return loc2 + } + if loc2 < 0 { + return loc1 + } + if loc1 < loc2 { + return loc1 + } + return loc2 +} diff --git a/internal/parse/names.go b/internal/parse/names.go new file mode 100644 index 0000000..2d24de9 --- /dev/null +++ b/internal/parse/names.go @@ -0,0 +1,174 @@ +package parse + +import ( + "github.com/sqlc-dev/oliphant/ast" + "github.com/sqlc-dev/oliphant/internal/lexer" +) + +// Identifier-class helpers: gram.y funnels every identifier-position +// consumption through a small set of productions encoding the four keyword +// reserved-ness categories plus the bare_label attribute. The lexer already +// classified each keyword token (Token.KeywordKind); a keyword token's Str is +// its canonical lower-case spelling, an IDENT's Str is the downcased, +// truncated identifier — in both cases exactly the C production's $$. + +// isColIdToken reports whether tok can begin ColId: +// gram.y: ColId: IDENT | unreserved_keyword | col_name_keyword +func isColIdToken(tok lexer.Token) bool { + switch tok.KeywordKind { + case ast.KeywordKind_NO_KEYWORD: + return tok.Kind == ast.Token_IDENT + case ast.KeywordKind_UNRESERVED_KEYWORD, ast.KeywordKind_COL_NAME_KEYWORD: + return true + } + return false +} + +// isTypeFunctionNameToken: +// gram.y: type_function_name: IDENT | unreserved_keyword | type_func_name_keyword +func isTypeFunctionNameToken(tok lexer.Token) bool { + switch tok.KeywordKind { + case ast.KeywordKind_NO_KEYWORD: + return tok.Kind == ast.Token_IDENT + case ast.KeywordKind_UNRESERVED_KEYWORD, ast.KeywordKind_TYPE_FUNC_NAME_KEYWORD: + return true + } + return false +} + +// isNonReservedWordToken: +// gram.y: NonReservedWord: IDENT | unreserved_keyword | col_name_keyword | +// type_func_name_keyword +func isNonReservedWordToken(tok lexer.Token) bool { + switch tok.KeywordKind { + case ast.KeywordKind_NO_KEYWORD: + return tok.Kind == ast.Token_IDENT + case ast.KeywordKind_UNRESERVED_KEYWORD, ast.KeywordKind_COL_NAME_KEYWORD, + ast.KeywordKind_TYPE_FUNC_NAME_KEYWORD: + return true + } + return false +} + +// isColLabelToken: +// gram.y: ColLabel: IDENT | unreserved_keyword | col_name_keyword | +// type_func_name_keyword | reserved_keyword +func isColLabelToken(tok lexer.Token) bool { + if tok.KeywordKind != ast.KeywordKind_NO_KEYWORD { + return true + } + return tok.Kind == ast.Token_IDENT +} + +// isBareColLabelToken: +// gram.y: BareColLabel: IDENT | bare_label_keyword +func isBareColLabelToken(tok lexer.Token) bool { + if tok.Kind == ast.Token_IDENT && tok.KeywordKind == ast.KeywordKind_NO_KEYWORD { + return true + } + if tok.KeywordKind == ast.KeywordKind_NO_KEYWORD { + return false + } + kw, ok := lexer.Keywords[tok.Str] + return ok && kw.BareLabel +} + +// colId consumes ColId or reports a syntax error. +func (p *parser) colId() string { + tok := p.peek() + if !isColIdToken(tok) { + p.syntaxError(tok) + } + p.next() + return tok.Str +} + +// typeFunctionName consumes type_function_name. +func (p *parser) typeFunctionName() string { + tok := p.peek() + if !isTypeFunctionNameToken(tok) { + p.syntaxError(tok) + } + p.next() + return tok.Str +} + +// nonReservedWord consumes NonReservedWord. +func (p *parser) nonReservedWord() string { + tok := p.peek() + if !isNonReservedWordToken(tok) { + p.syntaxError(tok) + } + p.next() + return tok.Str +} + +// colLabel consumes ColLabel. +func (p *parser) colLabel() string { + tok := p.peek() + if !isColLabelToken(tok) { + p.syntaxError(tok) + } + p.next() + return tok.Str +} + +// bareColLabel consumes BareColLabel. +func (p *parser) bareColLabel() string { + tok := p.peek() + if !isBareColLabelToken(tok) { + p.syntaxError(tok) + } + p.next() + return tok.Str +} + +// sconst consumes Sconst. +func (p *parser) sconst() string { + tok := p.expect(ast.Token_SCONST) + return tok.Str +} + +// iconst consumes Iconst. +func (p *parser) iconst() int32 { + tok := p.expect(ast.Token_ICONST) + return tok.Ival +} + +// gram.y: attr_name: ColLabel +func (p *parser) attrName() string { return p.colLabel() } + +// gram.y: name: ColId +func (p *parser) name() string { return p.colId() } + +// gram.y: param_name: type_function_name +func (p *parser) paramName() string { return p.typeFunctionName() } + +// gram.y: any_name: ColId | ColId attrs +// attrs: '.' attr_name | attrs '.' attr_name +func (p *parser) anyName() []*ast.Node { + names := []*ast.Node{nStr(p.colId())} + for p.have(ast.Token('.')) { + names = append(names, nStr(p.attrName())) + } + return names +} + +// gram.y: name_list: name | name_list ',' name +func (p *parser) nameList() []*ast.Node { + names := []*ast.Node{nStr(p.name())} + for p.have(ast.Token(',')) { + names = append(names, nStr(p.name())) + } + return names +} + +// gram.y: columnList: columnElem | columnList ',' columnElem +// columnElem: ColId +func (p *parser) columnList() []*ast.Node { + cols := []*ast.Node{nStr(p.colId())} + for p.have(ast.Token(',')) { + cols = append(cols, nStr(p.colId())) + } + return cols +} diff --git a/internal/parse/nodes.go b/internal/parse/nodes.go new file mode 100644 index 0000000..1a1bac5 --- /dev/null +++ b/internal/parse/nodes.go @@ -0,0 +1,237 @@ +package parse + +import ( + "github.com/sqlc-dev/oliphant/ast" +) + +// Node-wrapper constructors: the grammar actions build the generated +// protobuf structs directly, and every Node-typed position needs the oneof +// wrapper. These helpers keep the productions readable. + +func nStr(s string) *ast.Node { + return &ast.Node{Node: &ast.Node_String_{String_: &ast.String{Sval: s}}} +} + +func nInteger(i int32) *ast.Node { + return &ast.Node{Node: &ast.Node_Integer{Integer: &ast.Integer{Ival: i}}} +} + +func nList(items []*ast.Node) *ast.Node { + return &ast.Node{Node: &ast.Node_List{List: &ast.List{Items: items}}} +} + +func nAConst(c *ast.A_Const) *ast.Node { + return &ast.Node{Node: &ast.Node_AConst{AConst: c}} +} + +func nColumnRef(c *ast.ColumnRef) *ast.Node { + return &ast.Node{Node: &ast.Node_ColumnRef{ColumnRef: c}} +} + +func nParamRef(pr *ast.ParamRef) *ast.Node { + return &ast.Node{Node: &ast.Node_ParamRef{ParamRef: pr}} +} + +func nAExpr(e *ast.A_Expr) *ast.Node { + return &ast.Node{Node: &ast.Node_AExpr{AExpr: e}} +} + +func nBoolExpr(e *ast.BoolExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_BoolExpr{BoolExpr: e}} +} + +func nTypeCast(tc *ast.TypeCast) *ast.Node { + return &ast.Node{Node: &ast.Node_TypeCast{TypeCast: tc}} +} + +func nCollateClause(c *ast.CollateClause) *ast.Node { + return &ast.Node{Node: &ast.Node_CollateClause{CollateClause: c}} +} + +func nFuncCall(f *ast.FuncCall) *ast.Node { + return &ast.Node{Node: &ast.Node_FuncCall{FuncCall: f}} +} + +func nAStar() *ast.Node { + return &ast.Node{Node: &ast.Node_AStar{AStar: &ast.A_Star{}}} +} + +func nAIndices(ai *ast.A_Indices) *ast.Node { + return &ast.Node{Node: &ast.Node_AIndices{AIndices: ai}} +} + +func nAIndirection(a *ast.A_Indirection) *ast.Node { + return &ast.Node{Node: &ast.Node_AIndirection{AIndirection: a}} +} + +func nAArrayExpr(a *ast.A_ArrayExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_AArrayExpr{AArrayExpr: a}} +} + +func nResTarget(rt *ast.ResTarget) *ast.Node { + return &ast.Node{Node: &ast.Node_ResTarget{ResTarget: rt}} +} + +func nSubLink(s *ast.SubLink) *ast.Node { + return &ast.Node{Node: &ast.Node_SubLink{SubLink: s}} +} + +func nSelectStmt(s *ast.SelectStmt) *ast.Node { + return &ast.Node{Node: &ast.Node_SelectStmt{SelectStmt: s}} +} + +func nRangeVar(r *ast.RangeVar) *ast.Node { + return &ast.Node{Node: &ast.Node_RangeVar{RangeVar: r}} +} + +func nRangeSubselect(r *ast.RangeSubselect) *ast.Node { + return &ast.Node{Node: &ast.Node_RangeSubselect{RangeSubselect: r}} +} + +func nRangeFunction(r *ast.RangeFunction) *ast.Node { + return &ast.Node{Node: &ast.Node_RangeFunction{RangeFunction: r}} +} + +func nJoinExpr(j *ast.JoinExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_JoinExpr{JoinExpr: j}} +} + +func nSortBy(s *ast.SortBy) *ast.Node { + return &ast.Node{Node: &ast.Node_SortBy{SortBy: s}} +} + +func nWindowDef(w *ast.WindowDef) *ast.Node { + return &ast.Node{Node: &ast.Node_WindowDef{WindowDef: w}} +} + +func nLockingClause(l *ast.LockingClause) *ast.Node { + return &ast.Node{Node: &ast.Node_LockingClause{LockingClause: l}} +} + +func nCommonTableExpr(c *ast.CommonTableExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_CommonTableExpr{CommonTableExpr: c}} +} + +func nCaseExpr(c *ast.CaseExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_CaseExpr{CaseExpr: c}} +} + +func nCaseWhen(w *ast.CaseWhen) *ast.Node { + return &ast.Node{Node: &ast.Node_CaseWhen{CaseWhen: w}} +} + +func nRowExpr(r *ast.RowExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_RowExpr{RowExpr: r}} +} + +func nGroupingFunc(g *ast.GroupingFunc) *ast.Node { + return &ast.Node{Node: &ast.Node_GroupingFunc{GroupingFunc: g}} +} + +func nGroupingSet(g *ast.GroupingSet) *ast.Node { + return &ast.Node{Node: &ast.Node_GroupingSet{GroupingSet: g}} +} + +func nNullTest(n *ast.NullTest) *ast.Node { + return &ast.Node{Node: &ast.Node_NullTest{NullTest: n}} +} + +func nBooleanTest(b *ast.BooleanTest) *ast.Node { + return &ast.Node{Node: &ast.Node_BooleanTest{BooleanTest: b}} +} + +func nNamedArgExpr(na *ast.NamedArgExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_NamedArgExpr{NamedArgExpr: na}} +} + +func nSQLValueFunction(s *ast.SQLValueFunction) *ast.Node { + return &ast.Node{Node: &ast.Node_SqlvalueFunction{SqlvalueFunction: s}} +} + +func nMinMaxExpr(m *ast.MinMaxExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_MinMaxExpr{MinMaxExpr: m}} +} + +func nCoalesceExpr(c *ast.CoalesceExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_CoalesceExpr{CoalesceExpr: c}} +} + +func nSetToDefault(s *ast.SetToDefault) *ast.Node { + return &ast.Node{Node: &ast.Node_SetToDefault{SetToDefault: s}} +} + +func nXmlExpr(x *ast.XmlExpr) *ast.Node { + return &ast.Node{Node: &ast.Node_XmlExpr{XmlExpr: x}} +} + +func nXmlSerialize(x *ast.XmlSerialize) *ast.Node { + return &ast.Node{Node: &ast.Node_XmlSerialize{XmlSerialize: x}} +} + +// asAConst returns the A_Const inside a node, or nil. +func asAConst(n *ast.Node) *ast.A_Const { + if w, ok := n.Node.(*ast.Node_AConst); ok { + return w.AConst + } + return nil +} + +// asSubLink returns the SubLink inside a node, or nil. +func asSubLink(n *ast.Node) *ast.SubLink { + if w, ok := n.Node.(*ast.Node_SubLink); ok { + return w.SubLink + } + return nil +} + +// asBoolExpr returns the BoolExpr inside a node, or nil. +func asBoolExpr(n *ast.Node) *ast.BoolExpr { + if w, ok := n.Node.(*ast.Node_BoolExpr); ok { + return w.BoolExpr + } + return nil +} + +// asFuncCall returns the FuncCall inside a node, or nil. +func asFuncCall(n *ast.Node) *ast.FuncCall { + if w, ok := n.Node.(*ast.Node_FuncCall); ok { + return w.FuncCall + } + return nil +} + +// asSelectStmt returns the SelectStmt inside a node, or nil. +func asSelectStmt(n *ast.Node) *ast.SelectStmt { + if w, ok := n.Node.(*ast.Node_SelectStmt); ok { + return w.SelectStmt + } + return nil +} + +// asString returns the String inside a node, or nil. +func asString(n *ast.Node) *ast.String { + if w, ok := n.Node.(*ast.Node_String_); ok { + return w.String_ + } + return nil +} + +// asList returns the List inside a node, or nil. +func asList(n *ast.Node) *ast.List { + if w, ok := n.Node.(*ast.Node_List); ok { + return w.List + } + return nil +} + +// asAStar reports whether the node is an A_Star. +func isAStar(n *ast.Node) bool { + _, ok := n.Node.(*ast.Node_AStar) + return ok +} + +// isAIndices reports whether the node is an A_Indices. +func isAIndices(n *ast.Node) bool { + _, ok := n.Node.(*ast.Node_AIndices) + return ok +} diff --git a/internal/parse/parser.go b/internal/parse/parser.go new file mode 100644 index 0000000..29a6bfb --- /dev/null +++ b/internal/parse/parser.go @@ -0,0 +1,194 @@ +// Package parse is the hand-written recursive-descent port of the pinned +// grammar (internal/reference/gram.y, libpg_query 17-6.2.2). One parse* +// method per production, each with an attribution comment naming the gram.y +// rule it implements; the support functions at the bottom of gram.y live in +// gram_support.go with the same names. +package parse + +import ( + "github.com/sqlc-dev/oliphant/ast" + "github.com/sqlc-dev/oliphant/internal/lexer" +) + +// pgVersionNum is the pinned PG_VERSION_NUM (PostgreSQL 17.7). +const pgVersionNum = 170007 + +// parser holds one parse's state: the filtered token stream (base_yylex +// semantics) buffered as the grammar pulls it, so lookahead never runs +// further ahead of the parse than bison's one (plus the filter's own) token. +type parser struct { + src string + filter *lexer.Filter + toks []lexer.Token + pos int + + // inSubstrList marks that we are parsing substr_list, where SIMILAR + // appears without TO (see parseAExprInfix). + inSubstrList bool +} + +// bail carries a parse error up to Parse via panic/recover: the reference +// aborts at the first error (bison + ereport longjmp), and threading error +// returns through several hundred productions would bury the grammar. +type bail struct{ err *lexer.Error } + +// Parse is raw_parser for RAW_PARSE_DEFAULT: parse_toplevel/stmtmulti. +func Parse(input string) (res *ast.ParseResult, err *lexer.Error) { + s := lexer.New(input) + p := &parser{src: s.Input(), filter: lexer.NewFilter(s)} + defer func() { + if r := recover(); r != nil { + if b, ok := r.(bail); ok { + res, err = nil, b.err + return + } + panic(r) + } + }() + return p.parseToplevel(), nil +} + +// fail aborts the parse with the given error. +func (p *parser) fail(err *lexer.Error) { + panic(bail{err}) +} + +// syntaxError aborts with bison's yyerror report at the given token. +func (p *parser) syntaxError(tok lexer.Token) { + p.fail(p.filter.SyntaxError(tok)) +} + +// syntaxErrorAt reports "syntax error" at the current lookahead token — the +// standard bison failure. +func (p *parser) syntaxErrorAt() { + p.syntaxError(p.peek()) +} + +// ereport aborts with a gram.y action error (no "at or near" decoration). +// loc == -1 omits the cursor position, like parser_errposition(-1). +func (p *parser) ereport(funcname, message string, loc int32) { + p.fail(p.filter.ParserError(funcname, message, int(loc))) +} + +// fill materializes buffered tokens up to and including index i. A scanner +// error surfaces immediately when its token is materialized, matching the +// C behavior where the core_yylex call throws. +func (p *parser) fill(i int) { + for len(p.toks) <= i { + tok, err := p.filter.Next() + if err != nil { + p.fail(err) + } + p.toks = append(p.toks, tok) + if tok.Kind == 0 { + // EOF repeats forever if peeked past. + return + } + } +} + +// peek returns the current lookahead token without consuming it. +func (p *parser) peek() lexer.Token { + return p.peekN(0) +} + +// peekN returns the lookahead token n positions ahead (0 = current). +func (p *parser) peekN(n int) lexer.Token { + p.fill(p.pos + n) + if p.pos+n >= len(p.toks) { + return p.toks[len(p.toks)-1] // EOF token + } + return p.toks[p.pos+n] +} + +// next consumes and returns the current token. +func (p *parser) next() lexer.Token { + tok := p.peek() + if tok.Kind != 0 { + p.pos++ + } + return tok +} + +// have consumes the current token if it has the given kind. +func (p *parser) have(kind ast.Token) bool { + if p.peek().Kind == kind { + p.pos++ + return true + } + return false +} + +// expect consumes a token of the given kind or reports a syntax error. +func (p *parser) expect(kind ast.Token) lexer.Token { + tok := p.peek() + if tok.Kind != kind { + p.syntaxError(tok) + } + p.pos++ + return tok +} + +// mark/reset implement bounded backtracking for the few places where the +// LALR tables carry alternatives further than one token of lookahead can +// distinguish (e.g. ConstTypename vs ColId for type keywords). +func (p *parser) mark() int { return p.pos } +func (p *parser) reset(mark int) { p.pos = mark } +func (p *parser) loc() int32 { return p.peek().Start } +func (p *parser) kind() ast.Token { return p.peek().Kind } +func (p *parser) kindN(n int) ast.Token { return p.peekN(n).Kind } + +// parseToplevel is gram.y's parse_toplevel/stmtmulti for the default parse +// mode: a semicolon-separated statement list, each wrapped in a RawStmt whose +// location bookkeeping is driven entirely by semicolon positions. +func (p *parser) parseToplevel() *ast.ParseResult { + res := &ast.ParseResult{Version: pgVersionNum} + + // gram.y: stmtmulti + var last *ast.RawStmt + stmtStart := int32(0) + for { + if stmt := p.parseToplevelStmt(); stmt != nil { + last = &ast.RawStmt{Stmt: stmt, StmtLocation: stmtStart} + res.Stmts = append(res.Stmts, last) + } + tok := p.peek() + if tok.Kind == 0 { + break + } + if tok.Kind != ast.Token(';') { + p.syntaxError(tok) + } + p.next() + // gram.y: stmtmulti — updateRawStmtEnd(llast, @2) and the next + // statement starts at @2 + 1. + if last != nil { + last.StmtLen = tok.Start - last.StmtLocation + last = nil + } + stmtStart = tok.Start + 1 + } + return res +} + +// parseToplevelStmt is toplevel_stmt/stmt: dispatch on the leading token. +// Milestone 4 implements the SELECT family; everything else reports the +// syntax error bison would only reach much later, and stays on the todo +// list until its milestone lands. +func (p *parser) parseToplevelStmt() *ast.Node { + tok := p.peek() + switch tok.Kind { + case ast.Token(';'), 0: + // Empty statement: stmt: /*EMPTY*/ + return nil + case ast.Token_SELECT, ast.Token_TABLE, ast.Token_VALUES, + ast.Token_WITH, ast.Token_WITH_LA: + // gram.y: SelectStmt: select_no_parens %prec UMINUS + return p.parseSelectStmt() + case ast.Token('('): + // gram.y: SelectStmt: select_with_parens %prec UMINUS + return p.parseSelectStmt() + } + p.syntaxError(tok) + return nil +} diff --git a/internal/parse/select.go b/internal/parse/select.go new file mode 100644 index 0000000..f137d64 --- /dev/null +++ b/internal/parse/select.go @@ -0,0 +1,1291 @@ +package parse + +import ( + "github.com/sqlc-dev/oliphant/ast" + "github.com/sqlc-dev/oliphant/internal/lexer" +) + +// selectLimit mirrors gram.y's SelectLimit struct. +type selectLimit struct { + limitOffset *ast.Node + limitCount *ast.Node + limitOption ast.LimitOption + optionTok lexer.Token +} + +// parseSelectStmt is gram.y's SelectStmt: +// select_no_parens %prec UMINUS | select_with_parens %prec UMINUS +// +// A leading '(' is handled inside select_no_parens' select_clause, which +// takes select_with_parens as a set-operation operand; a bare +// select_with_parens is the degenerate case with no trailing clauses. +func (p *parser) parseSelectStmt() *ast.Node { + return p.parseSelectNoParens() +} + +// parseSelectWithParens is gram.y's select_with_parens: +// '(' select_no_parens ')' | '(' select_with_parens ')' +func (p *parser) parseSelectWithParens() *ast.Node { + p.expect(ast.Token('(')) + sel := p.parseSelectNoParens() + p.expect(ast.Token(')')) + return sel +} + +// parseSelectNoParens is gram.y's select_no_parens: a select_clause (set-op +// tree over simple_selects) plus the clauses that attach only at the top +// level of an unparenthesized select, merged via insertSelectOptions. +func (p *parser) parseSelectNoParens() *ast.Node { + var with *ast.WithClause + if p.kind() == ast.Token_WITH || p.kind() == ast.Token_WITH_LA { + with = p.parseWithClause() + } + + sel := p.parseSelectClause(0) + + var sort []*ast.Node + if p.kind() == ast.Token_ORDER { + sort = p.parseSortClauseKeyword() + } + + var locking []*ast.Node + var limit *selectLimit + // The locking clause may come before or after LIMIT/OFFSET. + for { + switch p.kind() { + case ast.Token_FOR: + locking = append(locking, p.parseForLockingClause()...) + continue + case ast.Token_LIMIT, ast.Token_OFFSET, ast.Token_FETCH: + if limit != nil { + // A second limit clause: bison would fail at this token. + p.syntaxErrorAt() + } + limit = p.parseSelectLimit() + continue + } + break + } + + if with == nil && sort == nil && locking == nil && limit == nil { + return sel + } + p.insertSelectOptions(sel.GetSelectStmt(), sort, locking, limit, with) + return sel +} + +// parseSelectClause is gram.y's select_clause with the UNION/INTERSECT/ +// EXCEPT set operations, resolved by precedence climbing (INTERSECT binds +// tighter than UNION/EXCEPT; both %left). +func (p *parser) parseSelectClause(minPrec int) *ast.Node { + var lhs *ast.Node + if p.kind() == ast.Token('(') { + lhs = p.parseSelectWithParens() + } else { + lhs = p.parseSimpleSelect() + } + for { + var op ast.SetOperation + var prec int + switch p.kind() { + case ast.Token_UNION: + op, prec = ast.SetOperation_SETOP_UNION, 1 + case ast.Token_EXCEPT: + op, prec = ast.SetOperation_SETOP_EXCEPT, 1 + case ast.Token_INTERSECT: + op, prec = ast.SetOperation_SETOP_INTERSECT, 2 + default: + return lhs + } + if prec < minPrec { + return lhs + } + p.next() + // set_quantifier + all := p.have(ast.Token_ALL) + if !all { + p.have(ast.Token_DISTINCT) + } + rhs := p.parseSelectClause(prec + 1) + lhs = makeSetOp(op, all, lhs, rhs) + } +} + +// parseSimpleSelect is gram.y's simple_select (minus the set operations, +// which parseSelectClause layers on top). +func (p *parser) parseSimpleSelect() *ast.Node { + tok := p.peek() + switch tok.Kind { + case ast.Token_VALUES: + return p.parseValuesClause() + case ast.Token_TABLE: + // simple_select: TABLE relation_expr + p.next() + rel := p.parseRelationExpr() + cr := &ast.ColumnRef{Fields: []*ast.Node{nAStar()}, Location: -1} + rt := &ast.ResTarget{Val: nColumnRef(cr), Location: -1} + return nSelectStmt(&ast.SelectStmt{ + TargetList: []*ast.Node{nResTarget(rt)}, + FromClause: []*ast.Node{rel}, + LimitOption: ast.LimitOption_LIMIT_OPTION_DEFAULT, + Op: ast.SetOperation_SETOP_NONE, + }) + } + + p.expect(ast.Token_SELECT) + n := &ast.SelectStmt{ + LimitOption: ast.LimitOption_LIMIT_OPTION_DEFAULT, + Op: ast.SetOperation_SETOP_NONE, + } + + // opt_all_clause opt_target_list | distinct_clause target_list + requireTargets := false + switch p.kind() { + case ast.Token_ALL: + p.next() + case ast.Token_DISTINCT: + p.next() + if p.have(ast.Token_ON) { + p.expect(ast.Token('(')) + n.DistinctClause = p.parseExprList() + p.expect(ast.Token(')')) + } else { + // DISTINCT: list_make1(NIL) — a single empty-list placeholder. + n.DistinctClause = []*ast.Node{{}} + } + requireTargets = true + } + + if requireTargets || p.startsTargetEl() { + n.TargetList = p.parseTargetList() + } + + // into_clause + if p.have(ast.Token_INTO) { + n.IntoClause = p.parseIntoClauseRest() + } + // from_clause + if p.have(ast.Token_FROM) { + n.FromClause = p.parseFromList() + } + // where_clause + if p.have(ast.Token_WHERE) { + n.WhereClause = p.parseAExpr(0) + } + // group_clause + if p.kind() == ast.Token_GROUP_P { + p.next() + p.expect(ast.Token_BY) + if p.have(ast.Token_ALL) { + } else if p.have(ast.Token_DISTINCT) { + n.GroupDistinct = true + } + n.GroupClause = p.parseGroupByList() + } + // having_clause + if p.have(ast.Token_HAVING) { + n.HavingClause = p.parseAExpr(0) + } + // window_clause + if p.have(ast.Token_WINDOW) { + n.WindowClause = p.parseWindowDefinitionList() + } + return nSelectStmt(n) +} + +// startsTargetEl reports whether the current token can begin target_el — +// needed because opt_target_list can be empty (SELECT;). +func (p *parser) startsTargetEl() bool { + switch p.kind() { + case 0, ast.Token(';'), ast.Token(')'), ast.Token_FROM, ast.Token_INTO, + ast.Token_WHERE, ast.Token_GROUP_P, ast.Token_HAVING, ast.Token_WINDOW, + ast.Token_ORDER, ast.Token_LIMIT, ast.Token_OFFSET, ast.Token_FETCH, + ast.Token_FOR, ast.Token_UNION, ast.Token_INTERSECT, ast.Token_EXCEPT: + return false + } + return true +} + +// parseTargetList is gram.y's target_list. +func (p *parser) parseTargetList() []*ast.Node { + list := []*ast.Node{p.parseTargetEl()} + for p.have(ast.Token(',')) { + list = append(list, p.parseTargetEl()) + } + return list +} + +// parseTargetEl is gram.y's target_el. +func (p *parser) parseTargetEl() *ast.Node { + tok := p.peek() + if tok.Kind == ast.Token('*') { + p.next() + cr := &ast.ColumnRef{Fields: []*ast.Node{nAStar()}, Location: tok.Start} + return nResTarget(&ast.ResTarget{Val: nColumnRef(cr), Location: tok.Start}) + } + val := p.parseAExpr(0) + rt := &ast.ResTarget{Val: val, Location: tok.Start} + if p.have(ast.Token_AS) { + rt.Name = p.colLabel() + } else if isBareColLabelToken(p.peek()) { + rt.Name = p.next().Str + } + return nResTarget(rt) +} + +// parseValuesClause is gram.y's values_clause. +func (p *parser) parseValuesClause() *ast.Node { + p.expect(ast.Token_VALUES) + n := &ast.SelectStmt{ + LimitOption: ast.LimitOption_LIMIT_OPTION_DEFAULT, + Op: ast.SetOperation_SETOP_NONE, + } + for { + p.expect(ast.Token('(')) + list := p.parseExprList() + p.expect(ast.Token(')')) + n.ValuesLists = append(n.ValuesLists, nList(list)) + if !p.have(ast.Token(',')) { + break + } + } + return nSelectStmt(n) +} + +// parseWithClause is gram.y's with_clause. +func (p *parser) parseWithClause() *ast.WithClause { + tok := p.next() // WITH or WITH_LA + w := &ast.WithClause{Location: tok.Start} + if tok.Kind == ast.Token_WITH && p.have(ast.Token_RECURSIVE) { + w.Recursive = true + } + w.Ctes = []*ast.Node{p.parseCommonTableExpr()} + for p.have(ast.Token(',')) { + w.Ctes = append(w.Ctes, p.parseCommonTableExpr()) + } + return w +} + +// parseCommonTableExpr is gram.y's common_table_expr. +func (p *parser) parseCommonTableExpr() *ast.Node { + tok := p.peek() + cte := &ast.CommonTableExpr{Location: tok.Start} + cte.Ctename = p.name() + if p.have(ast.Token('(')) { + cte.Aliascolnames = p.nameList() + p.expect(ast.Token(')')) + } + p.expect(ast.Token_AS) + // opt_materialized + cte.Ctematerialized = ast.CTEMaterialize_CTEMaterializeDefault + if p.have(ast.Token_MATERIALIZED) { + cte.Ctematerialized = ast.CTEMaterialize_CTEMaterializeAlways + } else if p.kind() == ast.Token_NOT && p.kindN(1) == ast.Token_MATERIALIZED { + p.next() + p.next() + cte.Ctematerialized = ast.CTEMaterialize_CTEMaterializeNever + } + p.expect(ast.Token('(')) + // PreparableStmt: SelectStmt (milestone 4; DML lands with milestone 5) + cte.Ctequery = p.parsePreparableStmt() + p.expect(ast.Token(')')) + cte.SearchClause = p.parseOptSearchClause() + cte.CycleClause = p.parseOptCycleClause() + return nCommonTableExpr(cte) +} + +// parsePreparableStmt is gram.y's PreparableStmt, restricted to the +// statement types implemented so far. +func (p *parser) parsePreparableStmt() *ast.Node { + switch p.kind() { + case ast.Token_SELECT, ast.Token_TABLE, ast.Token_VALUES, + ast.Token_WITH, ast.Token_WITH_LA, ast.Token('('): + return p.parseSelectStmt() + } + p.syntaxErrorAt() + return nil +} + +// parseOptSearchClause is gram.y's opt_search_clause. +func (p *parser) parseOptSearchClause() *ast.CTESearchClause { + if p.kind() != ast.Token_SEARCH { + return nil + } + tok := p.next() + s := &ast.CTESearchClause{Location: tok.Start} + switch { + case p.have(ast.Token_DEPTH): + case p.have(ast.Token_BREADTH): + s.SearchBreadthFirst = true + default: + p.syntaxErrorAt() + } + p.expect(ast.Token_FIRST_P) + p.expect(ast.Token_BY) + s.SearchColList = p.columnList() + p.expect(ast.Token_SET) + s.SearchSeqColumn = p.colId() + return s +} + +// parseOptCycleClause is gram.y's opt_cycle_clause. +func (p *parser) parseOptCycleClause() *ast.CTECycleClause { + if p.kind() != ast.Token_CYCLE { + return nil + } + tok := p.next() + c := &ast.CTECycleClause{Location: tok.Start} + c.CycleColList = p.columnList() + p.expect(ast.Token_SET) + c.CycleMarkColumn = p.colId() + if p.have(ast.Token_TO) { + c.CycleMarkValue = p.parseAexprConst() + p.expect(ast.Token_DEFAULT) + c.CycleMarkDefault = p.parseAexprConst() + } else { + c.CycleMarkValue = makeBoolAConst(true, -1) + c.CycleMarkDefault = makeBoolAConst(false, -1) + } + p.expect(ast.Token_USING) + c.CyclePathColumn = p.colId() + return c +} + +// parseAexprConst parses gram.y's AexprConst in isolation (used by the CTE +// cycle clause). +func (p *parser) parseAexprConst() *ast.Node { + tok := p.peek() + switch tok.Kind { + case ast.Token_ICONST: + p.next() + return makeIntConst(tok.Ival, tok.Start) + case ast.Token_FCONST: + p.next() + return makeFloatConst(tok.Str, tok.Start) + case ast.Token_SCONST: + p.next() + return makeStringConst(tok.Str, tok.Start) + case ast.Token_BCONST: + p.next() + return makeBitStringConst(tok.Str, tok.Start) + case ast.Token_XCONST: + p.next() + return makeBitStringConst(tok.Str, tok.Start) + case ast.Token_TRUE_P: + p.next() + return makeBoolAConst(true, tok.Start) + case ast.Token_FALSE_P: + p.next() + return makeBoolAConst(false, tok.Start) + case ast.Token_NULL_P: + p.next() + return makeNullAConst(tok.Start) + case ast.Token('+'), ast.Token('-'): + // AexprConst has no signed numbers, but doNegate applies via a_expr + // in the callers that allow it; cycle clause uses bare AexprConst. + p.syntaxErrorAt() + } + if c := p.parseConstTypenameExpr(); c != nil { + return c + } + // func_name Sconst / func_name '(' ... ')' Sconst + n := p.parseFuncOrColumnRef() + if _, ok := n.Node.(*ast.Node_TypeCast); !ok { + p.syntaxErrorAt() + } + return n +} + +// parseIntoClauseRest is gram.y's into_clause/OptTempTableName after INTO. +func (p *parser) parseIntoClauseRest() *ast.IntoClause { + into := &ast.IntoClause{OnCommit: ast.OnCommitAction_ONCOMMIT_NOOP} + persistence := "p" + switch p.kind() { + case ast.Token_TEMPORARY, ast.Token_TEMP: + p.next() + p.have(ast.Token_TABLE) + persistence = "t" + case ast.Token_LOCAL: + p.next() + if !p.have(ast.Token_TEMPORARY) { + p.expect(ast.Token_TEMP) + } + p.have(ast.Token_TABLE) + persistence = "t" + case ast.Token_GLOBAL: + p.next() + if !p.have(ast.Token_TEMPORARY) { + p.expect(ast.Token_TEMP) + } + p.have(ast.Token_TABLE) + persistence = "t" + case ast.Token_UNLOGGED: + p.next() + p.have(ast.Token_TABLE) + persistence = "u" + case ast.Token_TABLE: + p.next() + } + rel := p.parseQualifiedName() + rel.Relpersistence = persistence + into.Rel = rel + return into +} + +// parseQualifiedName is gram.y's qualified_name. +func (p *parser) parseQualifiedName() *ast.RangeVar { + tok := p.peek() + name := p.colId() + if p.kind() == ast.Token('.') || p.kind() == ast.Token('[') { + ind := p.parseOptIndirection() + return p.makeRangeVarFromQualifiedName(name, ind, tok.Start) + } + return makeRangeVar("", name, tok.Start) +} + +// parseFromList is gram.y's from_list. +func (p *parser) parseFromList() []*ast.Node { + list := []*ast.Node{p.parseTableRef()} + for p.have(ast.Token(',')) { + list = append(list, p.parseTableRef()) + } + return list +} + +// parseTableRef is gram.y's table_ref, including joined_table layering. +func (p *parser) parseTableRef() *ast.Node { + ref := p.parseTableRefAtom() + return p.parseJoinedTableRest(ref) +} + +// parseJoinedTableRest layers JOIN clauses onto a parsed table_ref. +func (p *parser) parseJoinedTableRest(larg *ast.Node) *ast.Node { + for { + switch p.kind() { + case ast.Token_CROSS: + p.next() + p.expect(ast.Token_JOIN) + rarg := p.parseTableRefAtom() + larg = nJoinExpr(&ast.JoinExpr{ + Jointype: ast.JoinType_JOIN_INNER, + Larg: larg, + Rarg: rarg, + }) + case ast.Token_JOIN: + // A qual-requiring join cannot reduce until its join_qual + // appears, so its right operand absorbs further joins first + // (bison shifts); CROSS/NATURAL joins reduce immediately + // (%left JOIN), keeping left associativity. + p.next() + rarg := p.parseTableRef() + j := &ast.JoinExpr{Jointype: ast.JoinType_JOIN_INNER, Larg: larg, Rarg: rarg} + p.parseJoinQual(j) + larg = nJoinExpr(j) + case ast.Token_INNER_P, ast.Token_LEFT, ast.Token_RIGHT, ast.Token_FULL: + jt := p.parseJoinType() + p.expect(ast.Token_JOIN) + rarg := p.parseTableRef() + j := &ast.JoinExpr{Jointype: jt, Larg: larg, Rarg: rarg} + p.parseJoinQual(j) + larg = nJoinExpr(j) + case ast.Token_NATURAL: + p.next() + jt := ast.JoinType_JOIN_INNER + switch p.kind() { + case ast.Token_INNER_P, ast.Token_LEFT, ast.Token_RIGHT, ast.Token_FULL: + jt = p.parseJoinType() + } + p.expect(ast.Token_JOIN) + rarg := p.parseTableRefAtom() + larg = nJoinExpr(&ast.JoinExpr{ + Jointype: jt, + IsNatural: true, + Larg: larg, + Rarg: rarg, + }) + default: + return larg + } + } +} + +// parseJoinType is gram.y's join_type (the JOIN keyword not included). +func (p *parser) parseJoinType() ast.JoinType { + switch p.next().Kind { + case ast.Token_FULL: + p.have(ast.Token_OUTER_P) + return ast.JoinType_JOIN_FULL + case ast.Token_LEFT: + p.have(ast.Token_OUTER_P) + return ast.JoinType_JOIN_LEFT + case ast.Token_RIGHT: + p.have(ast.Token_OUTER_P) + return ast.JoinType_JOIN_RIGHT + default: // INNER_P + return ast.JoinType_JOIN_INNER + } +} + +// parseJoinQual is gram.y's join_qual, filling the JoinExpr. +func (p *parser) parseJoinQual(j *ast.JoinExpr) { + if p.have(ast.Token_USING) { + p.expect(ast.Token('(')) + j.UsingClause = p.nameList() + p.expect(ast.Token(')')) + // opt_alias_clause_for_join_using + if p.have(ast.Token_AS) { + j.JoinUsingAlias = &ast.Alias{Aliasname: p.colId()} + } + return + } + p.expect(ast.Token_ON) + j.Quals = p.parseAExpr(0) +} + +// parseTableRefAtom parses one table_ref without trailing JOINs. +func (p *parser) parseTableRefAtom() *ast.Node { + switch p.kind() { + case ast.Token('('): + // select_with_parens or '(' joined_table ')' + if sel, ok := p.trySelectWithParens(); ok { + // table_ref: select_with_parens opt_alias_clause + rs := &ast.RangeSubselect{Subquery: sel} + rs.Alias = p.parseOptAliasClause() + return nRangeSubselect(rs) + } + p.next() + inner := p.parseTableRef() + p.expect(ast.Token(')')) + if j, ok := inner.Node.(*ast.Node_JoinExpr); ok { + // table_ref: '(' joined_table ')' alias_clause + if alias, ok := p.parseAliasClauseOpt(); ok { + j.JoinExpr.Alias = alias + } + return inner + } + // A parenthesized non-join table_ref is only valid as joined_table + // '(' joined_table ')' — bison rejects it at the ')'. + p.syntaxErrorAt() + return nil + + case ast.Token_XMLTABLE: + if p.kindN(1) == ast.Token('(') { + // table_ref: xmltable opt_alias_clause + xt := p.parseXmlTable() + xt.GetRangeTableFunc().Alias = p.parseOptAliasClause() + return xt + } + + case ast.Token_JSON_TABLE: + if p.kindN(1) == ast.Token('(') { + // table_ref: json_table opt_alias_clause + jt := p.parseJsonTable() + jt.GetJsonTable().Alias = p.parseOptAliasClause() + return jt + } + + case ast.Token_LATERAL_P: + p.next() + switch { + case p.kind() == ast.Token('('): + sel := p.mustSelectWithParens() + rs := &ast.RangeSubselect{Lateral: true, Subquery: sel} + rs.Alias = p.parseOptAliasClause() + return nRangeSubselect(rs) + case p.kind() == ast.Token_XMLTABLE: + xt := p.parseXmlTable() + xt.GetRangeTableFunc().Lateral = true + xt.GetRangeTableFunc().Alias = p.parseOptAliasClause() + return xt + case p.kind() == ast.Token_JSON_TABLE: + jt := p.parseJsonTable() + jt.GetJsonTable().Lateral = true + jt.GetJsonTable().Alias = p.parseOptAliasClause() + return jt + case p.kind() == ast.Token_ROWS: + rf := p.parseRowsFrom() + rf.Lateral = true + p.parseFuncAliasClause(rf) + return nRangeFunction(rf) + default: + // LATERAL_P func_table func_alias_clause + fn := p.parseFuncTableFunc() + fn.Lateral = true + p.parseFuncAliasClause(fn) + return nRangeFunction(fn) + } + + case ast.Token_ROWS: + // func_table: ROWS FROM '(' rowsfrom_list ')' opt_ordinality + if p.kindN(1) == ast.Token_FROM { + rf := p.parseRowsFrom() + p.parseFuncAliasClause(rf) + return nRangeFunction(rf) + } + + case ast.Token_ONLY: + return p.finishRelationTableRef(p.parseRelationExprVar()) + } + + // relation_expr or func_table (func_expr_windowless), distinguished by + // what follows the qualified name: '(' means function. + if p.startsFunctionCallAhead() { + fn := p.parseFuncTableFunc() + p.parseFuncAliasClause(fn) + return nRangeFunction(fn) + } + return p.finishRelationTableRef(p.parseRelationExprVar()) +} + +// finishRelationTableRef attaches opt_alias_clause and tablesample_clause. +func (p *parser) finishRelationTableRef(rel *ast.RangeVar) *ast.Node { + rel.Alias = p.parseOptAliasClause() + if p.kind() == ast.Token_TABLESAMPLE { + // gram.y: tablesample_clause — n->location = @2 (the method name). + p.next() + ftok := p.peek() + method := p.parseFuncName(ftok) + p.expect(ast.Token('(')) + args := p.parseExprList() + p.expect(ast.Token(')')) + ts := &ast.RangeTableSample{ + Relation: nRangeVar(rel), + Method: method, + Args: args, + Location: ftok.Start, + } + if p.have(ast.Token_REPEATABLE) { + p.expect(ast.Token('(')) + ts.Repeatable = p.parseAExpr(0) + p.expect(ast.Token(')')) + } + return &ast.Node{Node: &ast.Node_RangeTableSample{RangeTableSample: ts}} + } + return nRangeVar(rel) +} + +// parseFuncName parses func_name for contexts outside c_expr (TABLESAMPLE). +func (p *parser) parseFuncName(tok lexer.Token) []*ast.Node { + if !isColIdToken(tok) { + name := p.typeFunctionName() + return []*ast.Node{nStr(name)} + } + p.next() + names := []*ast.Node{nStr(tok.Str)} + if ind := p.parseOptIndirection(); ind != nil { + names = p.check_func_name(append(names, ind...)) + } + return names +} + +// startsFunctionCallAhead reports whether a func_table (rather than a +// relation) starts here: a name possibly dotted, followed by '('. +func (p *parser) startsFunctionCallAhead() bool { + tok := p.peek() + if !isColIdToken(tok) && !isTypeFunctionNameToken(tok) { + return false + } + // Keywords with special function syntax are func_tables too + // (func_expr_common_subexpr in func_expr_windowless). + switch tok.Kind { + case ast.Token_CURRENT_DATE, ast.Token_CURRENT_TIME, ast.Token_CURRENT_TIMESTAMP, + ast.Token_LOCALTIME, ast.Token_LOCALTIMESTAMP, ast.Token_CURRENT_ROLE, + ast.Token_CURRENT_USER, ast.Token_SESSION_USER, ast.Token_USER, + ast.Token_CURRENT_CATALOG, ast.Token_CURRENT_SCHEMA, ast.Token_CAST, + ast.Token_SYSTEM_USER: + return true + } + // Scan past the (possibly dotted) name: name ('.' attr)* '('. + i := 1 + for { + switch p.kindN(i) { + case ast.Token('('): + return true + case ast.Token('.'): + i++ + if isColLabelToken(p.peekN(i)) { + i++ + continue + } + return false + default: + return false + } + } +} + +// parseFuncTableFunc parses func_table's func_expr_windowless form into a +// RangeFunction (without alias handling). +func (p *parser) parseFuncTableFunc() *ast.RangeFunction { + fn := p.parseFuncExprWindowless() + rf := &ast.RangeFunction{ + Functions: []*ast.Node{nList([]*ast.Node{fn, nil})}, + } + rf.Ordinality = p.parseOptOrdinality() + return rf +} + +// parseFuncExprWindowless is gram.y's func_expr_windowless. +func (p *parser) parseFuncExprWindowless() *ast.Node { + tok := p.peek() + if n := p.parseFuncExprKeyword(tok); n != nil { + return n + } + // func_application without decorations. + name := p.parseFuncName(tok) + return p.parseFuncApplicationNoDecoration(name, tok) +} + +// parseFuncApplicationNoDecoration parses just func_application. +func (p *parser) parseFuncApplicationNoDecoration(name []*ast.Node, nameTok lexer.Token) *ast.Node { + p.expect(ast.Token('(')) + fc := makeFuncCall(name, nil, ast.CoercionForm_COERCE_EXPLICIT_CALL, nameTok.Start) + switch { + case p.have(ast.Token(')')): + case p.have(ast.Token('*')): + p.expect(ast.Token(')')) + fc.AggStar = true + case p.kind() == ast.Token_ALL: + p.next() + fc.Args = p.parseFuncArgList() + fc.AggOrder = p.parseOptSortClause() + p.expect(ast.Token(')')) + case p.kind() == ast.Token_DISTINCT: + p.next() + fc.Args = p.parseFuncArgList() + fc.AggOrder = p.parseOptSortClause() + p.expect(ast.Token(')')) + fc.AggDistinct = true + case p.kind() == ast.Token_VARIADIC: + p.next() + fc.Args = []*ast.Node{p.parseFuncArgExpr()} + fc.FuncVariadic = true + fc.AggOrder = p.parseOptSortClause() + p.expect(ast.Token(')')) + default: + fc.Args = []*ast.Node{p.parseFuncArgExpr()} + for p.have(ast.Token(',')) { + if p.have(ast.Token_VARIADIC) { + fc.Args = append(fc.Args, p.parseFuncArgExpr()) + fc.FuncVariadic = true + break + } + fc.Args = append(fc.Args, p.parseFuncArgExpr()) + } + fc.AggOrder = p.parseOptSortClause() + p.expect(ast.Token(')')) + } + return nFuncCall(fc) +} + +// parseRowsFrom parses ROWS FROM '(' rowsfrom_list ')' opt_ordinality. +func (p *parser) parseRowsFrom() *ast.RangeFunction { + p.expect(ast.Token_ROWS) + p.expect(ast.Token_FROM) + p.expect(ast.Token('(')) + rf := &ast.RangeFunction{IsRowsfrom: true} + for { + fn := p.parseFuncExprWindowless() + var coldefs *ast.Node + if p.kind() == ast.Token_AS { + p.next() + p.expect(ast.Token('(')) + defs := p.parseTableFuncElementList() + p.expect(ast.Token(')')) + coldefs = nList(defs) + } + if coldefs == nil { + rf.Functions = append(rf.Functions, nList([]*ast.Node{fn, nil})) + } else { + rf.Functions = append(rf.Functions, nList([]*ast.Node{fn, coldefs})) + } + if !p.have(ast.Token(',')) { + break + } + } + p.expect(ast.Token(')')) + rf.Ordinality = p.parseOptOrdinality() + return rf +} + +// parseOptOrdinality is gram.y's opt_ordinality: WITH_LA ORDINALITY. +func (p *parser) parseOptOrdinality() bool { + if p.kind() == ast.Token_WITH_LA { + p.next() + p.expect(ast.Token_ORDINALITY) + return true + } + return false +} + +// parseFuncAliasClause is gram.y's func_alias_clause, applied to rf. +func (p *parser) parseFuncAliasClause(rf *ast.RangeFunction) { + switch p.kind() { + case ast.Token_AS: + p.next() + if p.have(ast.Token('(')) { + rf.Coldeflist = p.parseTableFuncElementList() + p.expect(ast.Token(')')) + return + } + a := &ast.Alias{Aliasname: p.colId()} + if p.have(ast.Token('(')) { + if p.startsTableFuncElement() { + rf.Alias = a + rf.Coldeflist = p.parseTableFuncElementList() + p.expect(ast.Token(')')) + return + } + a.Colnames = p.nameList() + p.expect(ast.Token(')')) + } + rf.Alias = a + default: + if !isColIdToken(p.peek()) { + return + } + a := &ast.Alias{Aliasname: p.colId()} + if p.have(ast.Token('(')) { + if p.startsTableFuncElement() { + rf.Alias = a + rf.Coldeflist = p.parseTableFuncElementList() + p.expect(ast.Token(')')) + return + } + a.Colnames = p.nameList() + p.expect(ast.Token(')')) + } + rf.Alias = a + } +} + +// startsTableFuncElement distinguishes a coldeflist "name Typename" from a +// plain column-name list "name, name": a TableFuncElement is ColId followed +// by a type name start. +func (p *parser) startsTableFuncElement() bool { + if !isColIdToken(p.peek()) { + return false + } + next := p.peekN(1) + switch next.Kind { + case ast.Token(','), ast.Token(')'): + return false + } + return true +} + +// parseTableFuncElementList is gram.y's TableFuncElementList. +func (p *parser) parseTableFuncElementList() []*ast.Node { + list := []*ast.Node{p.parseTableFuncElement()} + for p.have(ast.Token(',')) { + list = append(list, p.parseTableFuncElement()) + } + return list +} + +// parseTableFuncElement is gram.y's TableFuncElement: ColId Typename +// opt_collate_clause. +func (p *parser) parseTableFuncElement() *ast.Node { + tok := p.peek() + name := p.colId() + t := p.parseTypename() + cd := &ast.ColumnDef{ + Colname: name, + TypeName: t, + IsLocal: true, + Location: tok.Start, + } + if p.kind() == ast.Token_COLLATE { + ctok := p.next() + cd.CollClause = &ast.CollateClause{ + Collname: p.anyName(), + Location: ctok.Start, + } + } + return &ast.Node{Node: &ast.Node_ColumnDef{ColumnDef: cd}} +} + +// parseRelationExpr is gram.y's relation_expr. +func (p *parser) parseRelationExpr() *ast.Node { + if p.have(ast.Token_ONLY) { + // ONLY qualified_name | ONLY '(' qualified_name ')' + if p.have(ast.Token('(')) { + rel := p.parseQualifiedName() + p.expect(ast.Token(')')) + rel.Inh = false + return nRangeVar(rel) + } + rel := p.parseQualifiedName() + rel.Inh = false + return nRangeVar(rel) + } + rel := p.parseQualifiedName() + rel.Inh = true + if p.have(ast.Token('*')) { + // qualified_name '*': explicit inheritance + } + return nRangeVar(rel) +} + +// parseRelationExpr as *RangeVar for contexts that need the struct. +func (p *parser) parseRelationExprVar() *ast.RangeVar { + return p.parseRelationExpr().GetRangeVar() +} + +// parseOptAliasClause is gram.y's opt_alias_clause. +func (p *parser) parseOptAliasClause() *ast.Alias { + a, _ := p.parseAliasClauseOpt() + return a +} + +// parseAliasClauseOpt parses alias_clause if present. +func (p *parser) parseAliasClauseOpt() (*ast.Alias, bool) { + switch { + case p.have(ast.Token_AS): + a := &ast.Alias{Aliasname: p.colId()} + if p.have(ast.Token('(')) { + a.Colnames = p.nameList() + p.expect(ast.Token(')')) + } + return a, true + case isColIdToken(p.peek()): + a := &ast.Alias{Aliasname: p.colId()} + if p.have(ast.Token('(')) { + a.Colnames = p.nameList() + p.expect(ast.Token(')')) + } + return a, true + } + return nil, false +} + +// parseGroupByList is gram.y's group_by_list. +func (p *parser) parseGroupByList() []*ast.Node { + list := []*ast.Node{p.parseGroupByItem()} + for p.have(ast.Token(',')) { + list = append(list, p.parseGroupByItem()) + } + return list +} + +// parseGroupByItem is gram.y's group_by_item. +func (p *parser) parseGroupByItem() *ast.Node { + tok := p.peek() + switch tok.Kind { + case ast.Token('('): + // empty_grouping_set: '(' ')' + if p.kindN(1) == ast.Token(')') { + p.next() + p.next() + return nGroupingSet(&ast.GroupingSet{ + Kind: ast.GroupingSetKind_GROUPING_SET_EMPTY, + Location: tok.Start, + }) + } + case ast.Token_CUBE, ast.Token_ROLLUP: + if p.kindN(1) == ast.Token('(') { + p.next() + p.next() + content := p.parseExprList() + p.expect(ast.Token(')')) + kind := ast.GroupingSetKind_GROUPING_SET_CUBE + if tok.Kind == ast.Token_ROLLUP { + kind = ast.GroupingSetKind_GROUPING_SET_ROLLUP + } + return nGroupingSet(&ast.GroupingSet{Kind: kind, Content: content, Location: tok.Start}) + } + case ast.Token_GROUPING: + if p.kindN(1) == ast.Token_SETS { + p.next() + p.next() + p.expect(ast.Token('(')) + content := p.parseGroupByList() + p.expect(ast.Token(')')) + return nGroupingSet(&ast.GroupingSet{ + Kind: ast.GroupingSetKind_GROUPING_SET_SETS, + Content: content, + Location: tok.Start, + }) + } + } + return p.parseAExpr(0) +} + +// parseWindowDefinitionList is gram.y's window_definition_list. +func (p *parser) parseWindowDefinitionList() []*ast.Node { + list := []*ast.Node{p.parseWindowDefinition()} + for p.have(ast.Token(',')) { + list = append(list, p.parseWindowDefinition()) + } + return list +} + +// parseWindowDefinition is gram.y's window_definition. +func (p *parser) parseWindowDefinition() *ast.Node { + name := p.colId() + p.expect(ast.Token_AS) + w := p.parseWindowSpecification() + w.Name = name + return nWindowDef(w) +} + +// parseSortClauseKeyword parses ORDER BY sortby_list (ORDER is current). +func (p *parser) parseSortClauseKeyword() []*ast.Node { + p.expect(ast.Token_ORDER) + p.expect(ast.Token_BY) + list := []*ast.Node{p.parseSortBy()} + for p.have(ast.Token(',')) { + list = append(list, p.parseSortBy()) + } + return list +} + +// parseSortClause is gram.y's sort_clause. +func (p *parser) parseSortClause() []*ast.Node { + return p.parseSortClauseKeyword() +} + +// parseOptSortClause is gram.y's opt_sort_clause. +func (p *parser) parseOptSortClause() []*ast.Node { + if p.kind() == ast.Token_ORDER { + return p.parseSortClauseKeyword() + } + return nil +} + +// parseSortBy is gram.y's sortby. +func (p *parser) parseSortBy() *ast.Node { + node := p.parseAExpr(0) + sb := &ast.SortBy{Node: node, Location: -1} + switch p.kind() { + case ast.Token_USING: + utok := p.next() + optok := p.peek() + _ = optok + sb.SortbyDir = ast.SortByDir_SORTBY_USING + sb.UseOp = p.parseQualAllOp() + sb.Location = utok.Start + // gram.y: @3 — the operator's location, not USING's. + sb.Location = optok.Start + case ast.Token_ASC: + p.next() + sb.SortbyDir = ast.SortByDir_SORTBY_ASC + case ast.Token_DESC: + p.next() + sb.SortbyDir = ast.SortByDir_SORTBY_DESC + default: + sb.SortbyDir = ast.SortByDir_SORTBY_DEFAULT + } + // opt_nulls_order + if p.kind() == ast.Token_NULLS_LA { + p.next() + if p.have(ast.Token_FIRST_P) { + sb.SortbyNulls = ast.SortByNulls_SORTBY_NULLS_FIRST + } else { + p.expect(ast.Token_LAST_P) + sb.SortbyNulls = ast.SortByNulls_SORTBY_NULLS_LAST + } + } else { + sb.SortbyNulls = ast.SortByNulls_SORTBY_NULLS_DEFAULT + } + return nSortBy(sb) +} + +// parseQualAllOp is gram.y's qual_all_Op. +func (p *parser) parseQualAllOp() []*ast.Node { + if p.kind() == ast.Token_OPERATOR { + return p.parseQualOp() + } + return []*ast.Node{nStr(p.parseAllOp())} +} + +// parseForLockingClause is gram.y's for_locking_clause (one FOR item; the +// caller loops for for_locking_items). +func (p *parser) parseForLockingClause() []*ast.Node { + p.expect(ast.Token_FOR) + var strength ast.LockClauseStrength + switch { + case p.have(ast.Token_UPDATE): + strength = ast.LockClauseStrength_LCS_FORUPDATE + case p.have(ast.Token_NO): + p.expect(ast.Token_KEY) + p.expect(ast.Token_UPDATE) + strength = ast.LockClauseStrength_LCS_FORNOKEYUPDATE + case p.have(ast.Token_SHARE): + strength = ast.LockClauseStrength_LCS_FORSHARE + case p.have(ast.Token_KEY): + p.expect(ast.Token_SHARE) + strength = ast.LockClauseStrength_LCS_FORKEYSHARE + case p.have(ast.Token_READ): + // for_locking_clause: FOR READ ONLY => NIL + p.expect(ast.Token_ONLY) + return nil + default: + p.syntaxErrorAt() + } + lc := &ast.LockingClause{Strength: strength} + if p.have(ast.Token_OF) { + lc.LockedRels = []*ast.Node{nRangeVar(p.parseQualifiedName())} + for p.have(ast.Token(',')) { + lc.LockedRels = append(lc.LockedRels, nRangeVar(p.parseQualifiedName())) + } + } + // opt_nowait_or_skip + switch { + case p.have(ast.Token_NOWAIT): + lc.WaitPolicy = ast.LockWaitPolicy_LockWaitError + case p.kind() == ast.Token_SKIP && p.kindN(1) == ast.Token_LOCKED: + p.next() + p.next() + lc.WaitPolicy = ast.LockWaitPolicy_LockWaitSkip + default: + lc.WaitPolicy = ast.LockWaitPolicy_LockWaitBlock + } + return []*ast.Node{nLockingClause(lc)} +} + +// parseSelectLimit is gram.y's select_limit. +func (p *parser) parseSelectLimit() *selectLimit { + sl := &selectLimit{limitOption: ast.LimitOption_LIMIT_OPTION_UNDEFINED} + seenLimit, seenOffset := false, false + for { + switch { + case !seenLimit && p.kind() == ast.Token_LIMIT: + tok := p.next() + seenLimit = true + sl.optionTok = tok + if p.kind() == ast.Token_ALL { + // LIMIT ALL is represented as a NULL constant + all := p.next() + sl.limitCount = makeNullAConst(all.Start) + } else { + sl.limitCount = p.parseAExpr(0) + } + sl.limitOption = ast.LimitOption_LIMIT_OPTION_COUNT + if p.have(ast.Token(',')) { + p.ereport("base_yyparse", "LIMIT #,# syntax is not supported", tok.Start) + } + case !seenOffset && p.kind() == ast.Token_OFFSET: + p.next() + seenOffset = true + // select_offset_value: a_expr | select_fetch_first_value row_or_rows + sl.limitOffset = p.parseAExpr(0) + if p.kind() == ast.Token_ROW || p.kind() == ast.Token_ROWS { + p.next() + } + if sl.limitOption == ast.LimitOption_LIMIT_OPTION_UNDEFINED { + sl.limitOption = ast.LimitOption_LIMIT_OPTION_COUNT + } + case !seenLimit && p.kind() == ast.Token_FETCH: + tok := p.next() + seenLimit = true + sl.optionTok = tok + // first_or_next + if !p.have(ast.Token_FIRST_P) { + p.expect(ast.Token_NEXT) + } + // select_fetch_first_value or bare row_or_rows + if p.kind() == ast.Token_ROW || p.kind() == ast.Token_ROWS { + sl.limitCount = makeIntConst(1, -1) + } else { + sl.limitCount = p.parseFetchFirstValue() + } + if !p.have(ast.Token_ROW) { + p.expect(ast.Token_ROWS) + } + if p.have(ast.Token_ONLY) { + sl.limitOption = ast.LimitOption_LIMIT_OPTION_COUNT + } else { + p.expect(ast.Token_WITH) + p.expect(ast.Token_TIES) + sl.limitOption = ast.LimitOption_LIMIT_OPTION_WITH_TIES + } + default: + if sl.limitOption == ast.LimitOption_LIMIT_OPTION_UNDEFINED { + sl.limitOption = ast.LimitOption_LIMIT_OPTION_COUNT + } + return sl + } + } +} + +// parseFetchFirstValue is gram.y's select_fetch_first_value. +func (p *parser) parseFetchFirstValue() *ast.Node { + tok := p.peek() + switch tok.Kind { + case ast.Token('+'), ast.Token('-'): + p.next() + c := p.peek() + switch c.Kind { + case ast.Token_ICONST: + p.next() + v := makeIntConst(c.Ival, c.Start) + if tok.Kind == ast.Token('-') { + return doNegate(v, tok.Start) + } + return nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_OP, "+", nil, v, tok.Start)) + case ast.Token_FCONST: + p.next() + v := makeFloatConst(c.Str, c.Start) + if tok.Kind == ast.Token('-') { + return doNegate(v, tok.Start) + } + return nAExpr(makeSimpleA_Expr(ast.A_Expr_Kind_AEXPR_OP, "+", nil, v, tok.Start)) + } + p.syntaxErrorAt() + } + c, _ := p.parseCExprEx() + return c +} + +// insertSelectOptions is gram.y's insertSelectOptions. +func (p *parser) insertSelectOptions(stmt *ast.SelectStmt, sortClause []*ast.Node, + lockingClause []*ast.Node, limit *selectLimit, with *ast.WithClause) { + + if sortClause != nil { + if stmt.SortClause != nil { + p.ereport("insertSelectOptions", "multiple ORDER BY clauses not allowed", + exprLocationList(sortClause)) + } + stmt.SortClause = sortClause + } + stmt.LockingClause = append(stmt.LockingClause, lockingClause...) + if limit != nil && limit.limitOffset != nil { + if stmt.LimitOffset != nil { + p.ereport("insertSelectOptions", "multiple OFFSET clauses not allowed", + exprLocation(limit.limitOffset)) + } + stmt.LimitOffset = limit.limitOffset + } + if limit != nil && limit.limitCount != nil { + if stmt.LimitCount != nil { + p.ereport("insertSelectOptions", "multiple LIMIT clauses not allowed", + exprLocation(limit.limitCount)) + } + stmt.LimitCount = limit.limitCount + } + if limit != nil { + if stmt.LimitOption != ast.LimitOption_LIMIT_OPTION_DEFAULT { + p.ereport("insertSelectOptions", "multiple limit options not allowed", -1) + } + if stmt.SortClause == nil && limit.limitOption == ast.LimitOption_LIMIT_OPTION_WITH_TIES { + p.ereport("insertSelectOptions", "WITH TIES cannot be specified without ORDER BY clause", -1) + } + if limit.limitOption == ast.LimitOption_LIMIT_OPTION_WITH_TIES && stmt.LockingClause != nil { + for _, lcn := range stmt.LockingClause { + lc := lcn.GetLockingClause() + if lc != nil && lc.WaitPolicy == ast.LockWaitPolicy_LockWaitSkip { + p.ereport("insertSelectOptions", + "SKIP LOCKED and WITH TIES options cannot be used together", -1) + } + } + } + stmt.LimitOption = limit.limitOption + } + if with != nil { + if stmt.WithClause != nil { + p.ereport("insertSelectOptions", "multiple WITH clauses not allowed", with.Location) + } + stmt.WithClause = with + } +} diff --git a/internal/parse/tablefuncs.go b/internal/parse/tablefuncs.go new file mode 100644 index 0000000..87579a1 --- /dev/null +++ b/internal/parse/tablefuncs.go @@ -0,0 +1,291 @@ +package parse + +import ( + "github.com/sqlc-dev/oliphant/ast" +) + +// makefuncs.c: makeDefElem +func makeDefElem(name string, arg *ast.Node, location int32) *ast.Node { + return &ast.Node{Node: &ast.Node_DefElem{DefElem: &ast.DefElem{ + Defname: name, + Arg: arg, + Defaction: ast.DefElemAction_DEFELEM_UNSPEC, + Location: location, + }}} +} + +// makefuncs.c: makeJsonTablePathSpec +func makeJsonTablePathSpec(pathstring, name string, stringLocation, nameLocation int32) *ast.JsonTablePathSpec { + return &ast.JsonTablePathSpec{ + String_: makeStringConst(pathstring, stringLocation), + Name: name, + NameLocation: nameLocation, + Location: stringLocation, + } +} + +// parseXmlTable is gram.y's xmltable; current token is XMLTABLE, '(' next. +func (p *parser) parseXmlTable() *ast.Node { + tok := p.next() // XMLTABLE + p.expect(ast.Token('(')) + n := &ast.RangeTableFunc{Location: tok.Start} + + if p.kind() == ast.Token_XMLNAMESPACES { + p.next() + p.expect(ast.Token('(')) + n.Namespaces = []*ast.Node{p.parseXmlNamespaceEl()} + for p.have(ast.Token(',')) { + n.Namespaces = append(n.Namespaces, p.parseXmlNamespaceEl()) + } + p.expect(ast.Token(')')) + p.expect(ast.Token(',')) + } + rowexpr, _ := p.parseCExprEx() + n.Rowexpr = rowexpr + n.Docexpr = p.parseXmlExistsArgument() + p.expect(ast.Token_COLUMNS) + n.Columns = []*ast.Node{p.parseXmlTableColumnEl()} + for p.have(ast.Token(',')) { + n.Columns = append(n.Columns, p.parseXmlTableColumnEl()) + } + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_RangeTableFunc{RangeTableFunc: n}} +} + +// parseXmlNamespaceEl is gram.y's xml_namespace_el. +func (p *parser) parseXmlNamespaceEl() *ast.Node { + tok := p.peek() + if p.have(ast.Token_DEFAULT) { + val := p.parseBExpr(0) + return nResTarget(&ast.ResTarget{Val: val, Location: tok.Start}) + } + val := p.parseBExpr(0) + p.expect(ast.Token_AS) + name := p.colLabel() + return nResTarget(&ast.ResTarget{Name: name, Val: val, Location: tok.Start}) +} + +// parseXmlTableColumnEl is gram.y's xmltable_column_el. +func (p *parser) parseXmlTableColumnEl() *ast.Node { + tok := p.peek() + name := p.colId() + fc := &ast.RangeTableFuncCol{Colname: name, Location: tok.Start} + if p.kind() == ast.Token_FOR { + p.next() + p.expect(ast.Token_ORDINALITY) + fc.ForOrdinality = true + return &ast.Node{Node: &ast.Node_RangeTableFuncCol{RangeTableFuncCol: fc}} + } + fc.TypeName = p.parseTypename() + + nullabilitySeen := false + for { + otok := p.peek() + var defname string + var arg *ast.Node + switch otok.Kind { + case ast.Token_IDENT: + p.next() + if otok.Str == "__pg__is_not_null" { + p.ereport("base_yyparse", + `option name "`+otok.Str+`" cannot be used in XMLTABLE`, otok.Start) + } + defname = otok.Str + arg = p.parseBExpr(0) + case ast.Token_DEFAULT: + p.next() + defname = "default" + arg = p.parseBExpr(0) + case ast.Token_NOT: + p.next() + p.expect(ast.Token_NULL_P) + defname = "__pg__is_not_null" + arg = &ast.Node{Node: &ast.Node_Boolean{Boolean: &ast.Boolean{Boolval: true}}} + case ast.Token_NULL_P: + p.next() + defname = "__pg__is_not_null" + arg = &ast.Node{Node: &ast.Node_Boolean{Boolean: &ast.Boolean{Boolval: false}}} + case ast.Token_PATH: + p.next() + defname = "path" + arg = p.parseBExpr(0) + default: + return &ast.Node{Node: &ast.Node_RangeTableFuncCol{RangeTableFuncCol: fc}} + } + // gram.y: xmltable_column_el's option-merging loop + switch defname { + case "default": + if fc.Coldefexpr != nil { + p.ereport("base_yyparse", "only one DEFAULT value is allowed", otok.Start) + } + fc.Coldefexpr = arg + case "path": + if fc.Colexpr != nil { + p.ereport("base_yyparse", "only one PATH value per column is allowed", otok.Start) + } + fc.Colexpr = arg + case "__pg__is_not_null": + if nullabilitySeen { + p.ereport("base_yyparse", + `conflicting or redundant NULL / NOT NULL declarations for column "`+fc.Colname+`"`, otok.Start) + } + fc.IsNotNull = arg.GetBoolean().Boolval + nullabilitySeen = true + default: + p.ereport("base_yyparse", + `unrecognized column option "`+defname+`"`, otok.Start) + } + } +} + +// parseJsonTable is gram.y's json_table; current token is JSON_TABLE. +func (p *parser) parseJsonTable() *ast.Node { + tok := p.next() // JSON_TABLE + p.expect(ast.Token('(')) + n := &ast.JsonTable{Location: tok.Start} + ctx := p.parseJsonValueExpr() + n.ContextItem = ctx.GetJsonValueExpr() + p.expect(ast.Token(',')) + ptok := p.peek() + path := p.parseAExpr(0) + pconst := asAConst(path) + var pathstring string + if pconst == nil || pconst.GetSval() == nil { + p.ereport("base_yyparse", + "only string constants are supported in JSON_TABLE path specification", ptok.Start) + } else { + pathstring = pconst.GetSval().Sval + } + // json_table_path_name_opt — @6 is the production's start, i.e. the AS + // token's location. + name := "" + nameLoc := int32(-1) + if p.kind() == ast.Token_AS { + nameLoc = p.next().Start + name = p.name() + } + n.Pathspec = makeJsonTablePathSpec(pathstring, name, ptok.Start, nameLoc) + if p.have(ast.Token_PASSING) { + n.Passing = []*ast.Node{p.parseJsonArgument()} + for p.have(ast.Token(',')) { + n.Passing = append(n.Passing, p.parseJsonArgument()) + } + } + p.expect(ast.Token_COLUMNS) + p.expect(ast.Token('(')) + n.Columns = p.parseJsonTableColumnDefinitionList() + p.expect(ast.Token(')')) + // json_on_error_clause_opt + if b := p.parseJsonBehaviorOpt(); b != nil { + p.expect(ast.Token_ON) + p.expect(ast.Token_ERROR_P) + n.OnError = b + } + p.expect(ast.Token(')')) + return &ast.Node{Node: &ast.Node_JsonTable{JsonTable: n}} +} + +// parseJsonTableColumnDefinitionList is json_table_column_definition_list. +func (p *parser) parseJsonTableColumnDefinitionList() []*ast.Node { + list := []*ast.Node{p.parseJsonTableColumnDefinition()} + for p.have(ast.Token(',')) { + list = append(list, p.parseJsonTableColumnDefinition()) + } + return list +} + +// parseJsonTableColumnDefinition is gram.y's json_table_column_definition. +func (p *parser) parseJsonTableColumnDefinition() *ast.Node { + tok := p.peek() + + if tok.Kind == ast.Token_NESTED { + // NESTED path_opt Sconst [AS name] COLUMNS '(' ... ')' + p.next() + p.have(ast.Token_PATH) + stok := p.peek() + pathstring := p.sconst() + name := "" + nameLoc := int32(-1) + if p.have(ast.Token_AS) { + ntok := p.peek() + name = p.name() + nameLoc = ntok.Start + } + p.expect(ast.Token_COLUMNS) + p.expect(ast.Token('(')) + cols := p.parseJsonTableColumnDefinitionList() + p.expect(ast.Token(')')) + return jsonTableColumnNode(&ast.JsonTableColumn{ + Coltype: ast.JsonTableColumnType_JTC_NESTED, + Pathspec: makeJsonTablePathSpec(pathstring, name, stok.Start, nameLoc), + Columns: cols, + Wrapper: ast.JsonWrapper_JSW_UNSPEC, + Quotes: ast.JsonQuotes_JS_QUOTES_UNSPEC, + Location: tok.Start, + }) + } + + name := p.colId() + if p.kind() == ast.Token_FOR { + p.next() + p.expect(ast.Token_ORDINALITY) + return jsonTableColumnNode(&ast.JsonTableColumn{ + Coltype: ast.JsonTableColumnType_JTC_FOR_ORDINALITY, + Name: name, + Wrapper: ast.JsonWrapper_JSW_UNSPEC, + Quotes: ast.JsonQuotes_JS_QUOTES_UNSPEC, + Location: tok.Start, + }) + } + + typeName := p.parseTypename() + n := &ast.JsonTableColumn{ + Name: name, + TypeName: typeName, + Location: tok.Start, + } + switch { + case p.kind() == ast.Token_EXISTS: + p.next() + n.Coltype = ast.JsonTableColumnType_JTC_EXISTS + n.Format = makeJsonFormat(ast.JsonFormatType_JS_FORMAT_DEFAULT, ast.JsonEncoding_JS_ENC_DEFAULT, -1) + n.Wrapper = ast.JsonWrapper_JSW_NONE + n.Quotes = ast.JsonQuotes_JS_QUOTES_UNSPEC + n.Pathspec = p.parseJsonTableColumnPathOpt() + if b := p.parseJsonBehaviorOpt(); b != nil { + p.expect(ast.Token_ON) + p.expect(ast.Token_ERROR_P) + n.OnError = b + } + case p.kind() == ast.Token_FORMAT_LA: + n.Coltype = ast.JsonTableColumnType_JTC_FORMATTED + n.Format = p.parseJsonFormatClause() + n.Pathspec = p.parseJsonTableColumnPathOpt() + n.Wrapper = p.parseJsonWrapperBehavior() + n.Quotes = p.parseJsonQuotesClauseOpt() + n.OnEmpty, n.OnError = p.parseJsonBehaviorClauseOpt() + default: + n.Coltype = ast.JsonTableColumnType_JTC_REGULAR + n.Format = makeJsonFormat(ast.JsonFormatType_JS_FORMAT_DEFAULT, ast.JsonEncoding_JS_ENC_DEFAULT, -1) + n.Pathspec = p.parseJsonTableColumnPathOpt() + n.Wrapper = p.parseJsonWrapperBehavior() + n.Quotes = p.parseJsonQuotesClauseOpt() + n.OnEmpty, n.OnError = p.parseJsonBehaviorClauseOpt() + } + return jsonTableColumnNode(n) +} + +func jsonTableColumnNode(c *ast.JsonTableColumn) *ast.Node { + return &ast.Node{Node: &ast.Node_JsonTableColumn{JsonTableColumn: c}} +} + +// parseJsonTableColumnPathOpt is json_table_column_path_clause_opt. +func (p *parser) parseJsonTableColumnPathOpt() *ast.JsonTablePathSpec { + if p.kind() != ast.Token_PATH { + return nil + } + p.next() + stok := p.peek() + s := p.sconst() + return makeJsonTablePathSpec(s, "", stok.Start, -1) +} diff --git a/internal/parse/typename.go b/internal/parse/typename.go new file mode 100644 index 0000000..be5b4fb --- /dev/null +++ b/internal/parse/typename.go @@ -0,0 +1,488 @@ +package parse + +import ( + "github.com/sqlc-dev/oliphant/ast" +) + +// datetime.h: INTERVAL_MASK(b) = 1 << b, with the field codes below. +const ( + intervalMaskMonth = 1 << 1 + intervalMaskYear = 1 << 2 + intervalMaskDay = 1 << 3 + intervalMaskHour = 1 << 10 + intervalMaskMinute = 1 << 11 + intervalMaskSecond = 1 << 12 + intervalFullRange = 0x7FFF // INTERVAL_FULL_RANGE +) + +// parseTypename is gram.y's Typename: SimpleTypename with optional SETOF and +// array bounds. +func (p *parser) parseTypename() *ast.TypeName { + setof := p.have(ast.Token_SETOF) + t := p.parseSimpleTypename() + t.Setof = setof + + // Typename: ... opt_array_bounds | ... ARRAY ['[' Iconst ']'] + if p.kind() == ast.Token_ARRAY { + p.next() + if p.have(ast.Token('[')) { + n := p.iconst() + p.expect(ast.Token(']')) + t.ArrayBounds = []*ast.Node{nInteger(n)} + } else { + t.ArrayBounds = []*ast.Node{nInteger(-1)} + } + return t + } + for p.kind() == ast.Token('[') { + p.next() + if p.have(ast.Token(']')) { + t.ArrayBounds = append(t.ArrayBounds, nInteger(-1)) + continue + } + n := p.iconst() + p.expect(ast.Token(']')) + t.ArrayBounds = append(t.ArrayBounds, nInteger(n)) + } + return t +} + +// parseSimpleTypename is gram.y's SimpleTypename. +func (p *parser) parseSimpleTypename() *ast.TypeName { + tok := p.peek() + if t := p.parseKeywordTypename(false); t != nil { + return t + } + + // GenericType: type_function_name [attrs] opt_type_modifiers + if !isTypeFunctionNameToken(tok) { + p.syntaxError(tok) + } + p.next() + names := []*ast.Node{nStr(tok.Str)} + for p.have(ast.Token('.')) { + names = append(names, nStr(p.attrName())) + } + t := makeTypeNameFromNameList(names) + t.Location = tok.Start + if p.have(ast.Token('(')) { + t.Typmods = p.parseExprList() + p.expect(ast.Token(')')) + } + return t +} + +// parseKeywordTypename parses the keyword-headed SimpleTypename families +// (Numeric, Bit, Character, ConstDatetime, ConstInterval opt_interval, +// JsonType), returning nil if the current token doesn't start one. When +// constForm is true, the ConstBit/ConstCharacter variants apply (unadorned +// BIT/CHAR default lengths are dropped) and INTERVAL is left to the caller +// (AexprConst handles its postfix options). +func (p *parser) parseKeywordTypename(constForm bool) *ast.TypeName { + tok := p.peek() + sysType := func(name string) *ast.TypeName { + p.next() + t := SystemTypeName(name) + t.Location = tok.Start + return t + } + switch tok.Kind { + // Numeric + case ast.Token_INT_P, ast.Token_INTEGER: + return sysType("int4") + case ast.Token_SMALLINT: + return sysType("int2") + case ast.Token_BIGINT: + return sysType("int8") + case ast.Token_REAL: + return sysType("float4") + case ast.Token_FLOAT_P: + // FLOAT_P opt_float + p.next() + var t *ast.TypeName + if p.have(ast.Token('(')) { + ptok := p.peek() + prec := p.iconst() + switch { + case prec < 1: + p.ereport("base_yyparse", "precision for type float must be at least 1 bit", ptok.Start) + case prec <= 24: + t = SystemTypeName("float4") + case prec <= 53: + t = SystemTypeName("float8") + default: + p.ereport("base_yyparse", "precision for type float must be less than 54 bits", ptok.Start) + } + p.expect(ast.Token(')')) + } else { + t = SystemTypeName("float8") + } + t.Location = tok.Start + return t + case ast.Token_DOUBLE_P: + // DOUBLE_P PRECISION + p.next() + p.expect(ast.Token_PRECISION) + t := SystemTypeName("float8") + t.Location = tok.Start + return t + case ast.Token_DECIMAL_P, ast.Token_DEC, ast.Token_NUMERIC: + p.next() + t := SystemTypeName("numeric") + t.Location = tok.Start + if p.have(ast.Token('(')) { + t.Typmods = p.parseExprList() + p.expect(ast.Token(')')) + } + return t + case ast.Token_BOOLEAN_P: + return sysType("bool") + + // Bit / ConstBit + case ast.Token_BIT: + p.next() + varying := p.have(ast.Token_VARYING) + var t *ast.TypeName + if p.have(ast.Token('(')) { + // BitWithLength + if varying { + t = SystemTypeName("varbit") + } else { + t = SystemTypeName("bit") + } + t.Typmods = p.parseExprList() + p.expect(ast.Token(')')) + } else { + // BitWithoutLength: bit defaults to bit(1), varbit to no limit + if varying { + t = SystemTypeName("varbit") + } else { + t = SystemTypeName("bit") + if !constForm { + t.Typmods = []*ast.Node{makeIntConst(1, -1)} + } + } + } + t.Location = tok.Start + return t + + // Character / ConstCharacter + case ast.Token_CHARACTER, ast.Token_CHAR_P, ast.Token_VARCHAR, + ast.Token_NCHAR, ast.Token_NATIONAL: + return p.parseCharacterTypename(constForm) + + // ConstDatetime + case ast.Token_TIMESTAMP, ast.Token_TIME: + p.next() + var typmods []*ast.Node + if p.have(ast.Token('(')) { + itok := p.peek() + n := p.iconst() + p.expect(ast.Token(')')) + typmods = []*ast.Node{makeIntConst(n, itok.Start)} + } + tz := p.parseOptTimezone() + var name string + if tok.Kind == ast.Token_TIMESTAMP { + name = "timestamp" + if tz { + name = "timestamptz" + } + } else { + name = "time" + if tz { + name = "timetz" + } + } + t := SystemTypeName(name) + t.Typmods = typmods + t.Location = tok.Start + return t + + // ConstInterval (SimpleTypename adds opt_interval / '(' Iconst ')') + case ast.Token_INTERVAL: + if constForm { + // AexprConst deals with INTERVAL's postfix options itself. + return nil + } + p.next() + t := SystemTypeName("interval") + t.Location = tok.Start + if p.have(ast.Token('(')) { + itok := p.peek() + n := p.iconst() + p.expect(ast.Token(')')) + t.Typmods = []*ast.Node{ + makeIntConst(intervalFullRange, -1), + makeIntConst(n, itok.Start), + } + } else { + t.Typmods = p.parseOptInterval() + } + return t + + // JsonType + case ast.Token_JSON: + return sysType("json") + } + return nil +} + +// parseCharacterTypename is gram.y's character/CharacterWithLength/ +// CharacterWithoutLength. +func (p *parser) parseCharacterTypename(constForm bool) *ast.TypeName { + tok := p.next() + var base string + switch tok.Kind { + case ast.Token_VARCHAR: + base = "varchar" + case ast.Token_NATIONAL: + // NATIONAL CHARACTER/CHAR_P opt_varying + if p.kind() != ast.Token_CHARACTER && p.kind() != ast.Token_CHAR_P { + p.syntaxErrorAt() + } + p.next() + base = "bpchar" + default: // CHARACTER, CHAR_P, NCHAR + base = "bpchar" + } + if base == "bpchar" && p.have(ast.Token_VARYING) { + base = "varchar" + } + var t *ast.TypeName + if p.have(ast.Token('(')) { + // CharacterWithLength + itok := p.peek() + n := p.iconst() + p.expect(ast.Token(')')) + t = SystemTypeName(base) + t.Typmods = []*ast.Node{makeIntConst(n, itok.Start)} + } else { + // CharacterWithoutLength: char defaults to char(1) + t = SystemTypeName(base) + if base == "bpchar" && !constForm { + t.Typmods = []*ast.Node{makeIntConst(1, -1)} + } + } + t.Location = tok.Start + return t +} + +// parseOptTimezone is gram.y's opt_timezone. +func (p *parser) parseOptTimezone() bool { + switch p.kind() { + case ast.Token_WITH_LA: + p.next() + p.expect(ast.Token_TIME) + p.expect(ast.Token_ZONE) + return true + case ast.Token_WITHOUT_LA: + p.next() + p.expect(ast.Token_TIME) + p.expect(ast.Token_ZONE) + return false + } + return false +} + +// parseOptInterval is gram.y's opt_interval: the INTERVAL qualifier masks. +func (p *parser) parseOptInterval() []*ast.Node { + tok := p.peek() + one := func(mask int32) []*ast.Node { + return []*ast.Node{makeIntConst(mask, tok.Start)} + } + switch tok.Kind { + case ast.Token_YEAR_P: + p.next() + if p.have(ast.Token_TO) { + p.expect(ast.Token_MONTH_P) + return one(intervalMaskYear | intervalMaskMonth) + } + return one(intervalMaskYear) + case ast.Token_MONTH_P: + p.next() + return one(intervalMaskMonth) + case ast.Token_DAY_P: + p.next() + if p.have(ast.Token_TO) { + switch p.kind() { + case ast.Token_HOUR_P: + p.next() + return one(intervalMaskDay | intervalMaskHour) + case ast.Token_MINUTE_P: + p.next() + return one(intervalMaskDay | intervalMaskHour | intervalMaskMinute) + case ast.Token_SECOND_P: + list := p.parseIntervalSecond() + list[0] = makeIntConst(intervalMaskDay|intervalMaskHour|intervalMaskMinute|intervalMaskSecond, tok.Start) + return list + } + p.syntaxErrorAt() + } + return one(intervalMaskDay) + case ast.Token_HOUR_P: + p.next() + if p.have(ast.Token_TO) { + switch p.kind() { + case ast.Token_MINUTE_P: + p.next() + return one(intervalMaskHour | intervalMaskMinute) + case ast.Token_SECOND_P: + list := p.parseIntervalSecond() + list[0] = makeIntConst(intervalMaskHour|intervalMaskMinute|intervalMaskSecond, tok.Start) + return list + } + p.syntaxErrorAt() + } + return one(intervalMaskHour) + case ast.Token_MINUTE_P: + p.next() + if p.have(ast.Token_TO) { + if p.kind() != ast.Token_SECOND_P { + p.syntaxErrorAt() + } + list := p.parseIntervalSecond() + list[0] = makeIntConst(intervalMaskMinute|intervalMaskSecond, tok.Start) + return list + } + return one(intervalMaskMinute) + case ast.Token_SECOND_P: + return p.parseIntervalSecond() + } + return nil +} + +// parseIntervalSecond is gram.y's interval_second. +func (p *parser) parseIntervalSecond() []*ast.Node { + tok := p.expect(ast.Token_SECOND_P) + list := []*ast.Node{makeIntConst(intervalMaskSecond, tok.Start)} + if p.have(ast.Token('(')) { + itok := p.peek() + n := p.iconst() + p.expect(ast.Token(')')) + list = append(list, makeIntConst(n, itok.Start)) + } + return list +} + +// parseConstTypenameExpr handles the AexprConst alternatives headed by a +// type keyword: +// +// ConstTypename {Sconst,PARAM} +// ConstInterval {Sconst opt_interval, '(' Iconst ')' Sconst, PARAM ...} +// +// It returns nil when the keyword cannot commit to a constant here (the +// caller falls back to columnref/function parsing). +func (p *parser) parseConstTypenameExpr() *ast.Node { + tok := p.peek() + switch tok.Kind { + case ast.Token_INTERVAL: + // Commits only when a Sconst/PARAM/'(' follows. + switch p.kindN(1) { + case ast.Token_SCONST: + p.next() + s := p.next() + t := SystemTypeName("interval") + t.Location = tok.Start + t.Typmods = p.parseOptInterval() + return makeStringConstCast(s.Str, s.Start, t) + case ast.Token_PARAM: + p.next() + prm := p.next() + t := SystemTypeName("interval") + t.Location = tok.Start + t.Typmods = p.parseOptInterval() + return makeParamRefCast(prm.Ival, prm.Start, t) + case ast.Token('('): + p.next() + p.next() + itok := p.peek() + n := p.iconst() + p.expect(ast.Token(')')) + t := SystemTypeName("interval") + t.Location = tok.Start + t.Typmods = []*ast.Node{ + makeIntConst(intervalFullRange, -1), + makeIntConst(n, itok.Start), + } + switch p.kind() { + case ast.Token_SCONST: + s := p.next() + return makeStringConstCast(s.Str, s.Start, t) + case ast.Token_PARAM: + prm := p.next() + return makeParamRefCast(prm.Ival, prm.Start, t) + } + p.syntaxErrorAt() + } + return nil + + case ast.Token_INT_P, ast.Token_INTEGER, ast.Token_SMALLINT, ast.Token_BIGINT, + ast.Token_REAL, ast.Token_BOOLEAN_P, ast.Token_JSON: + // Bare type keywords: commit only on a following Sconst/PARAM. + switch p.kindN(1) { + case ast.Token_SCONST, ast.Token_PARAM: + t := p.parseKeywordTypename(true) + return p.finishConstCast(t) + } + return nil + + case ast.Token_DOUBLE_P: + // DOUBLE PRECISION 'str' + if p.kindN(1) == ast.Token_PRECISION { + switch p.kindN(2) { + case ast.Token_SCONST, ast.Token_PARAM: + t := p.parseKeywordTypename(true) + return p.finishConstCast(t) + } + } + return nil + + case ast.Token_FLOAT_P, ast.Token_DECIMAL_P, ast.Token_DEC, ast.Token_NUMERIC, + ast.Token_BIT, ast.Token_TIMESTAMP, ast.Token_TIME, + ast.Token_CHARACTER, ast.Token_CHAR_P, ast.Token_VARCHAR, ast.Token_NCHAR: + // These commit when followed by a modifier/decoration or a constant: + // '(' begins typmods, VARYING/AS-IF decorations continue the type + // syntax, and Sconst/PARAM ends it. A bare keyword followed by + // anything else is a ColId. + switch p.kindN(1) { + case ast.Token_SCONST, ast.Token_PARAM, ast.Token('('): + t := p.parseKeywordTypename(true) + return p.finishConstCast(t) + case ast.Token_VARYING: + if tok.Kind == ast.Token_BIT || tok.Kind == ast.Token_CHARACTER || + tok.Kind == ast.Token_CHAR_P || tok.Kind == ast.Token_NCHAR { + t := p.parseKeywordTypename(true) + return p.finishConstCast(t) + } + case ast.Token_WITH_LA, ast.Token_WITHOUT_LA: + if tok.Kind == ast.Token_TIMESTAMP || tok.Kind == ast.Token_TIME { + t := p.parseKeywordTypename(true) + return p.finishConstCast(t) + } + } + return nil + + case ast.Token_NATIONAL: + if p.kindN(1) == ast.Token_CHARACTER || p.kindN(1) == ast.Token_CHAR_P { + t := p.parseKeywordTypename(true) + return p.finishConstCast(t) + } + return nil + } + return nil +} + +// finishConstCast expects the Sconst/PARAM ending a ConstTypename constant. +func (p *parser) finishConstCast(t *ast.TypeName) *ast.Node { + switch p.kind() { + case ast.Token_SCONST: + s := p.next() + return makeStringConstCast(s.Str, s.Start, t) + case ast.Token_PARAM: + prm := p.next() + return makeParamRefCast(prm.Ival, prm.Start, t) + } + p.syntaxErrorAt() + return nil +} diff --git a/parse_test.go b/parse_test.go index a9ec38a..f76835d 100644 --- a/parse_test.go +++ b/parse_test.go @@ -8,6 +8,7 @@ package oliphant_test import ( "fmt" "reflect" + "strings" "sync" "testing" @@ -579,9 +580,19 @@ var parseTests = []struct { }, } +// notYetImplementedStmt gates the pg_query_go test cases whose statement +// types belong to milestones 5-7 (DML, DDL); drop entries as they land. +func notYetImplementedStmt(input string) bool { + head := strings.ToUpper(strings.TrimSpace(input)) + return strings.HasPrefix(head, "INSERT") || strings.HasPrefix(head, "CREATE") +} + func TestParse(t *testing.T) { skipUnlessImplemented(t) for _, test := range parseTests { + if notYetImplementedStmt(test.input) { + continue // milestones 5-6 + } actualJSON, err := pg_query.ParseToJSON(test.input) if err != nil { t.Errorf("Parse(%s)\nerror %s\n\n", test.input, err) @@ -691,6 +702,10 @@ var parsePlPgSQLTests = []struct { } func TestParsePlPgSQL(t *testing.T) { + if _, err := pg_query.ParsePlPgSqlToJSON("SELECT 1"); err != nil && + strings.Contains(err.Error(), "not implemented") { + t.Skip("PL/pgSQL parser not implemented yet (milestone 11)") + } skipUnlessImplemented(t) for _, test := range parsePlPgSQLTests { actualJSON, err := pg_query.ParsePlPgSqlToJSON(test.input) diff --git a/parser/parser.go b/parser/parser.go index 662948e..3b2754f 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -14,7 +14,9 @@ import ( "google.golang.org/protobuf/proto" "github.com/sqlc-dev/oliphant/ast" + "github.com/sqlc-dev/oliphant/internal/emit" "github.com/sqlc-dev/oliphant/internal/lexer" + "github.com/sqlc-dev/oliphant/internal/parse" "github.com/sqlc-dev/oliphant/internal/xxh3" ) @@ -56,7 +58,11 @@ func errNotImplemented(name string) error { } func ParseToJSON(input string) (result string, err error) { - return "", errNotImplemented("ParseToJSON") + tree, perr := parse.Parse(input) + if perr != nil { + return "", scanErr(perr) + } + return emit.ParseResult(tree), nil } // ScanToProtobuf lexes the input with the core scanner exactly as @@ -84,7 +90,11 @@ func ScanToProtobuf(input string) (result []byte, err error) { } func ParseToProtobuf(input string) ([]byte, error) { - return nil, errNotImplemented("ParseToProtobuf") + tree, perr := parse.Parse(input) + if perr != nil { + return nil, scanErr(perr) + } + return proto.Marshal(tree) } func DeparseFromProtobuf(input []byte) (result string, err error) { diff --git a/parser/testdata/deparse/postgres_regress/advisory_lock.metadata.json b/parser/testdata/deparse/postgres_regress/advisory_lock.metadata.json index 251a33e..47ff6d5 100644 --- a/parser/testdata/deparse/postgres_regress/advisory_lock.metadata.json +++ b/parser/testdata/deparse/postgres_regress/advisory_lock.metadata.json @@ -3,40 +3,25 @@ "001", "002", "003", - "004", "005", - "006", "007", "008", - "009", "010", "011", - "012", "013", "014", - "015", "016", - "017", "018", "019", - "020", "021", "022", - "023", "024", - "025", "026", "027", - "028", "029", - "030", "031", - "032", "033", - "034", "035", - "036", - "037", - "038" + "037" ] } diff --git a/parser/testdata/deparse/postgres_regress/aggregates.metadata.json b/parser/testdata/deparse/postgres_regress/aggregates.metadata.json index 592c419..e38fdfe 100644 --- a/parser/testdata/deparse/postgres_regress/aggregates.metadata.json +++ b/parser/testdata/deparse/postgres_regress/aggregates.metadata.json @@ -326,7 +326,6 @@ "324", "325", "326", - "327", "328", "329", "330", diff --git a/parser/testdata/deparse/postgres_regress/collate.icu.utf8.metadata.json b/parser/testdata/deparse/postgres_regress/collate.icu.utf8.metadata.json index faccb98..ac3a9a6 100644 --- a/parser/testdata/deparse/postgres_regress/collate.icu.utf8.metadata.json +++ b/parser/testdata/deparse/postgres_regress/collate.icu.utf8.metadata.json @@ -115,7 +115,6 @@ "113", "114", "115", - "116", "117", "118", "119", diff --git a/parser/testdata/deparse/postgres_regress/collate.linux.utf8.metadata.json b/parser/testdata/deparse/postgres_regress/collate.linux.utf8.metadata.json index 648a6d3..83d100f 100644 --- a/parser/testdata/deparse/postgres_regress/collate.linux.utf8.metadata.json +++ b/parser/testdata/deparse/postgres_regress/collate.linux.utf8.metadata.json @@ -123,7 +123,6 @@ "121", "122", "123", - "124", "125", "126", "127", diff --git a/parser/testdata/deparse/postgres_regress/collate.metadata.json b/parser/testdata/deparse/postgres_regress/collate.metadata.json index 267f283..b933a65 100644 --- a/parser/testdata/deparse/postgres_regress/collate.metadata.json +++ b/parser/testdata/deparse/postgres_regress/collate.metadata.json @@ -79,7 +79,6 @@ "077", "078", "079", - "080", "081", "082", "083", diff --git a/parser/testdata/deparse/postgres_regress/collate.windows.win1252.metadata.json b/parser/testdata/deparse/postgres_regress/collate.windows.win1252.metadata.json index a4f4300..24e4d39 100644 --- a/parser/testdata/deparse/postgres_regress/collate.windows.win1252.metadata.json +++ b/parser/testdata/deparse/postgres_regress/collate.windows.win1252.metadata.json @@ -94,7 +94,6 @@ "092", "093", "094", - "095", "096", "097", "098", diff --git a/parser/testdata/deparse/postgres_regress/copyselect.metadata.json b/parser/testdata/deparse/postgres_regress/copyselect.metadata.json index 56098cb..57687ba 100644 --- a/parser/testdata/deparse/postgres_regress/copyselect.metadata.json +++ b/parser/testdata/deparse/postgres_regress/copyselect.metadata.json @@ -19,7 +19,6 @@ "017", "018", "019", - "020", "021" ] } diff --git a/parser/testdata/deparse/postgres_regress/create_am.metadata.json b/parser/testdata/deparse/postgres_regress/create_am.metadata.json index 83b3df4..fbb7044 100644 --- a/parser/testdata/deparse/postgres_regress/create_am.metadata.json +++ b/parser/testdata/deparse/postgres_regress/create_am.metadata.json @@ -35,7 +35,6 @@ "033", "034", "035", - "036", "037", "038", "039", diff --git a/parser/testdata/deparse/postgres_regress/create_function_c.metadata.json b/parser/testdata/deparse/postgres_regress/create_function_c.metadata.json index e8e06a4..90204d5 100644 --- a/parser/testdata/deparse/postgres_regress/create_function_c.metadata.json +++ b/parser/testdata/deparse/postgres_regress/create_function_c.metadata.json @@ -3,7 +3,6 @@ "001", "002", "003", - "004", "005" ] } diff --git a/parser/testdata/deparse/postgres_regress/create_function_sql.metadata.json b/parser/testdata/deparse/postgres_regress/create_function_sql.metadata.json index 643249b..86305c3 100644 --- a/parser/testdata/deparse/postgres_regress/create_function_sql.metadata.json +++ b/parser/testdata/deparse/postgres_regress/create_function_sql.metadata.json @@ -60,7 +60,6 @@ "058", "059", "060", - "061", "062", "063", "064", diff --git a/parser/testdata/deparse/postgres_regress/create_operator.metadata.json b/parser/testdata/deparse/postgres_regress/create_operator.metadata.json index 44e163a..bb4c277 100644 --- a/parser/testdata/deparse/postgres_regress/create_operator.metadata.json +++ b/parser/testdata/deparse/postgres_regress/create_operator.metadata.json @@ -13,7 +13,6 @@ "011", "012", "013", - "014", "015", "016", "017", diff --git a/parser/testdata/deparse/postgres_regress/create_table.metadata.json b/parser/testdata/deparse/postgres_regress/create_table.metadata.json index f382372..5e22279 100644 --- a/parser/testdata/deparse/postgres_regress/create_table.metadata.json +++ b/parser/testdata/deparse/postgres_regress/create_table.metadata.json @@ -29,7 +29,6 @@ "027", "028", "029", - "030", "031", "032", "033", diff --git a/parser/testdata/deparse/postgres_regress/domain.metadata.json b/parser/testdata/deparse/postgres_regress/domain.metadata.json index 60d70f4..738374b 100644 --- a/parser/testdata/deparse/postgres_regress/domain.metadata.json +++ b/parser/testdata/deparse/postgres_regress/domain.metadata.json @@ -17,7 +17,6 @@ "015", "016", "017", - "018", "019", "020", "021", @@ -54,9 +53,7 @@ "052", "053", "054", - "055", "056", - "057", "058", "059", "060", diff --git a/parser/testdata/deparse/postgres_regress/errors.metadata.json b/parser/testdata/deparse/postgres_regress/errors.metadata.json index b064cb7..13b81c8 100644 --- a/parser/testdata/deparse/postgres_regress/errors.metadata.json +++ b/parser/testdata/deparse/postgres_regress/errors.metadata.json @@ -4,7 +4,6 @@ "002", "003", "004", - "005", "006", "007", "008", diff --git a/parser/testdata/deparse/postgres_regress/event_trigger_login.metadata.json b/parser/testdata/deparse/postgres_regress/event_trigger_login.metadata.json index 4739b17..6413145 100644 --- a/parser/testdata/deparse/postgres_regress/event_trigger_login.metadata.json +++ b/parser/testdata/deparse/postgres_regress/event_trigger_login.metadata.json @@ -7,7 +7,6 @@ "005", "006", "007", - "008", "009", "010", "011" diff --git a/parser/testdata/deparse/postgres_regress/insert.metadata.json b/parser/testdata/deparse/postgres_regress/insert.metadata.json index 1751d7d..2ca7e85 100644 --- a/parser/testdata/deparse/postgres_regress/insert.metadata.json +++ b/parser/testdata/deparse/postgres_regress/insert.metadata.json @@ -363,7 +363,6 @@ "361", "362", "363", - "364", "365", "366", "367", diff --git a/parser/testdata/deparse/postgres_regress/largeobject.metadata.json b/parser/testdata/deparse/postgres_regress/largeobject.metadata.json index 48ba122..9cb7b18 100644 --- a/parser/testdata/deparse/postgres_regress/largeobject.metadata.json +++ b/parser/testdata/deparse/postgres_regress/largeobject.metadata.json @@ -15,7 +15,6 @@ "013", "014", "015", - "016", "017", "018", "019", @@ -75,20 +74,8 @@ "073", "074", "075", - "076", - "077", "078", "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", "090", "091", "092", @@ -108,7 +95,6 @@ "106", "107", "108", - "109", "110", "111", "112", diff --git a/parser/testdata/deparse/postgres_regress/limit.metadata.json b/parser/testdata/deparse/postgres_regress/limit.metadata.json index fb87925..336813a 100644 --- a/parser/testdata/deparse/postgres_regress/limit.metadata.json +++ b/parser/testdata/deparse/postgres_regress/limit.metadata.json @@ -72,8 +72,6 @@ "070", "071", "072", - "073", - "074", "075", "076", "077", diff --git a/parser/testdata/deparse/postgres_regress/misc_functions.metadata.json b/parser/testdata/deparse/postgres_regress/misc_functions.metadata.json index b6ecb7b..dd486fa 100644 --- a/parser/testdata/deparse/postgres_regress/misc_functions.metadata.json +++ b/parser/testdata/deparse/postgres_regress/misc_functions.metadata.json @@ -56,11 +56,9 @@ "054", "055", "056", - "057", "058", "059", "060", - "061", "062", "063", "064", @@ -107,9 +105,6 @@ "105", "106", "107", - "108", - "109", - "110", "111", "112", "113", @@ -117,7 +112,6 @@ "115", "116", "117", - "118", "119" ] } diff --git a/parser/testdata/deparse/postgres_regress/mvcc.metadata.json b/parser/testdata/deparse/postgres_regress/mvcc.metadata.json index 4739b17..218d15c 100644 --- a/parser/testdata/deparse/postgres_regress/mvcc.metadata.json +++ b/parser/testdata/deparse/postgres_regress/mvcc.metadata.json @@ -9,7 +9,6 @@ "007", "008", "009", - "010", "011" ] } diff --git a/parser/testdata/deparse/postgres_regress/numerology.metadata.json b/parser/testdata/deparse/postgres_regress/numerology.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/deparse/postgres_regress/numerology.metadata.json +++ b/parser/testdata/deparse/postgres_regress/numerology.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/deparse/postgres_regress/privileges.metadata.json b/parser/testdata/deparse/postgres_regress/privileges.metadata.json index 302fef8..80b732c 100644 --- a/parser/testdata/deparse/postgres_regress/privileges.metadata.json +++ b/parser/testdata/deparse/postgres_regress/privileges.metadata.json @@ -325,7 +325,6 @@ "323", "324", "325", - "326", "327", "328", "329", diff --git a/parser/testdata/deparse/postgres_regress/psql.metadata.json b/parser/testdata/deparse/postgres_regress/psql.metadata.json index 0612d4a..def6c9b 100644 --- a/parser/testdata/deparse/postgres_regress/psql.metadata.json +++ b/parser/testdata/deparse/postgres_regress/psql.metadata.json @@ -1,16 +1,7 @@ { "todo": [ "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", "010", - "011", "012", "013", "014", @@ -23,19 +14,15 @@ "021", "022", "023", - "024", "025", "026", - "027", "028", "029", "030", - "031", "032", "033", "034", "035", - "036", "037", "038", "039", @@ -194,7 +181,6 @@ "192", "193", "194", - "195", - "196" + "195" ] } diff --git a/parser/testdata/deparse/postgres_regress/psql_crosstab.metadata.json b/parser/testdata/deparse/postgres_regress/psql_crosstab.metadata.json index 5e6664a..52c3573 100644 --- a/parser/testdata/deparse/postgres_regress/psql_crosstab.metadata.json +++ b/parser/testdata/deparse/postgres_regress/psql_crosstab.metadata.json @@ -3,10 +3,7 @@ "001", "002", "003", - "004", "005", - "006", - "007", - "008" + "006" ] } diff --git a/parser/testdata/deparse/postgres_regress/reloptions.metadata.json b/parser/testdata/deparse/postgres_regress/reloptions.metadata.json index 7a82cd3..f4e6355 100644 --- a/parser/testdata/deparse/postgres_regress/reloptions.metadata.json +++ b/parser/testdata/deparse/postgres_regress/reloptions.metadata.json @@ -45,11 +45,8 @@ "043", "044", "045", - "046", "047", - "048", "049", - "050", "051", "052", "053", diff --git a/parser/testdata/deparse/postgres_regress/rowsecurity.metadata.json b/parser/testdata/deparse/postgres_regress/rowsecurity.metadata.json index dcaa437..2c2ac38 100644 --- a/parser/testdata/deparse/postgres_regress/rowsecurity.metadata.json +++ b/parser/testdata/deparse/postgres_regress/rowsecurity.metadata.json @@ -766,7 +766,6 @@ "764", "765", "766", - "767", "768", "769", "770", diff --git a/parser/testdata/deparse/postgres_regress/rules.metadata.json b/parser/testdata/deparse/postgres_regress/rules.metadata.json index 75d8f0c..6964785 100644 --- a/parser/testdata/deparse/postgres_regress/rules.metadata.json +++ b/parser/testdata/deparse/postgres_regress/rules.metadata.json @@ -68,7 +68,6 @@ "066", "067", "068", - "069", "070", "071", "072", diff --git a/parser/testdata/deparse/postgres_regress/sqljson.metadata.json b/parser/testdata/deparse/postgres_regress/sqljson.metadata.json index 78efa1d..5320f18 100644 --- a/parser/testdata/deparse/postgres_regress/sqljson.metadata.json +++ b/parser/testdata/deparse/postgres_regress/sqljson.metadata.json @@ -1,6 +1,5 @@ { "todo": [ - "001", "002", "003", "004", @@ -22,7 +21,6 @@ "020", "021", "022", - "023", "024", "025", "026", @@ -37,7 +35,6 @@ "035", "036", "037", - "038", "039", "040", "041", @@ -57,7 +54,6 @@ "055", "056", "057", - "058", "059", "060", "061", @@ -117,7 +113,6 @@ "115", "116", "117", - "118", "119", "120", "121", diff --git a/parser/testdata/deparse/postgres_regress/sqljson_jsontable.metadata.json b/parser/testdata/deparse/postgres_regress/sqljson_jsontable.metadata.json index 17a73dc..4c3150b 100644 --- a/parser/testdata/deparse/postgres_regress/sqljson_jsontable.metadata.json +++ b/parser/testdata/deparse/postgres_regress/sqljson_jsontable.metadata.json @@ -1,12 +1,10 @@ { "todo": [ - "001", "002", "003", "004", "005", "006", - "007", "008", "009", "010", @@ -84,7 +82,6 @@ "082", "083", "084", - "085", "086", "087", "088", @@ -106,7 +103,6 @@ "104", "105", "106", - "107", "108", "109", "110", diff --git a/parser/testdata/deparse/postgres_regress/stats.metadata.json b/parser/testdata/deparse/postgres_regress/stats.metadata.json index 5fff658..99b6ab6 100644 --- a/parser/testdata/deparse/postgres_regress/stats.metadata.json +++ b/parser/testdata/deparse/postgres_regress/stats.metadata.json @@ -72,41 +72,26 @@ "070", "071", "072", - "073", - "074", "075", - "076", "077", - "078", - "079", "080", "081", "082", "083", "084", "085", - "086", "087", "088", "089", "090", "091", "092", - "093", - "094", "095", - "096", "097", - "098", - "099", "100", - "101", - "102", "103", "104", "105", - "106", - "107", "108", "109", "110", @@ -114,8 +99,6 @@ "112", "113", "114", - "115", - "116", "117", "118", "119", @@ -126,62 +109,38 @@ "124", "125", "126", - "127", "128", - "129", - "130", - "131", - "132", - "133", "134", "135", - "136", "137", - "138", "139", "140", - "141", - "142", - "143", - "144", "145", "146", - "147", "148", - "149", "150", "151", - "152", - "153", - "154", "155", "156", "157", "158", - "159", "160", "161", "162", - "163", "164", "165", - "166", - "167", "168", "169", "170", "171", "172", "173", - "174", - "175", "176", "177", "178", "179", "180", "181", - "182", "183", "184", "185", @@ -213,7 +172,6 @@ "211", "212", "213", - "214", "215", "216", "217", @@ -224,7 +182,6 @@ "222", "223", "224", - "225", "226", "227", "228", @@ -235,7 +192,6 @@ "233", "234", "235", - "236", "237", "238", "239", @@ -249,47 +205,34 @@ "247", "248", "249", - "250", "251", "252", "253", "254", "255", "256", - "257", - "258", "259", "260", "261", "262", - "263", "264", "265", - "266", - "267", "268", "269", - "270", "271", "272", - "273", "274", "275", - "276", "277", "278", - "279", "280", "281", - "282", "283", "284", - "285", "286", "287", "288", "289", - "290", "291", "292", "293", @@ -313,37 +256,25 @@ "311", "312", "313", - "314", - "315", "316", "317", "318", "319", "320", - "321", - "322", "323", - "324", "325", "326", "327", "328", - "329", "330", - "331", "332", "333", "334", - "335", "336", - "337", "338", - "339", "340", - "341", "342", "343", - "344", "345", "346", "347", @@ -353,12 +284,9 @@ "351", "352", "353", - "354", "355", "356", "357", - "358", - "359", "360", "361", "362", @@ -366,7 +294,6 @@ "364", "365", "366", - "367", "368", "369", "370", @@ -378,7 +305,6 @@ "376", "377", "378", - "379", "380", "381", "382", @@ -389,11 +315,9 @@ "387", "388", "389", - "390", "391", "392", "393", - "394", "395", "396", "397", @@ -403,19 +327,15 @@ "401", "402", "403", - "404", - "405", "406", "407", "408", "409", "410", - "411", "412", "413", "414", "415", - "416", "417", "418", "419", diff --git a/parser/testdata/deparse/postgres_regress/strings.metadata.json b/parser/testdata/deparse/postgres_regress/strings.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/deparse/postgres_regress/strings.metadata.json +++ b/parser/testdata/deparse/postgres_regress/strings.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/deparse/postgres_regress/subscription.metadata.json b/parser/testdata/deparse/postgres_regress/subscription.metadata.json index d3267aa..494e73b 100644 --- a/parser/testdata/deparse/postgres_regress/subscription.metadata.json +++ b/parser/testdata/deparse/postgres_regress/subscription.metadata.json @@ -20,7 +20,6 @@ "018", "019", "020", - "021", "022", "023", "024", diff --git a/parser/testdata/deparse/postgres_regress/tablesample.metadata.json b/parser/testdata/deparse/postgres_regress/tablesample.metadata.json index dc9d431..6cc9a2d 100644 --- a/parser/testdata/deparse/postgres_regress/tablesample.metadata.json +++ b/parser/testdata/deparse/postgres_regress/tablesample.metadata.json @@ -50,7 +50,6 @@ "048", "049", "050", - "051", "052", "053", "054", diff --git a/parser/testdata/deparse/postgres_regress/tablespace.metadata.json b/parser/testdata/deparse/postgres_regress/tablespace.metadata.json index 479ae3b..67bd57b 100644 --- a/parser/testdata/deparse/postgres_regress/tablespace.metadata.json +++ b/parser/testdata/deparse/postgres_regress/tablespace.metadata.json @@ -43,8 +43,6 @@ "041", "042", "043", - "044", - "045", "046", "047", "048", diff --git a/parser/testdata/deparse/postgres_regress/transactions.metadata.json b/parser/testdata/deparse/postgres_regress/transactions.metadata.json index 342e97a..12a1280 100644 --- a/parser/testdata/deparse/postgres_regress/transactions.metadata.json +++ b/parser/testdata/deparse/postgres_regress/transactions.metadata.json @@ -377,13 +377,10 @@ "375", "376", "377", - "378", - "379", "380", "381", "382", "383", - "384", "385", "386", "387", @@ -395,11 +392,9 @@ "393", "394", "395", - "396", "397", "398", "399", - "400", "401", "402", "403", @@ -412,22 +407,16 @@ "410", "411", "412", - "413", "414", - "415", "416", "417", - "418", "419", - "420", "421", "422", "423", "424", - "425", "426", "427", - "428", "429", "430", "431", diff --git a/parser/testdata/deparse/postgres_regress/tsearch.metadata.json b/parser/testdata/deparse/postgres_regress/tsearch.metadata.json index 16d1dd4..61a7831 100644 --- a/parser/testdata/deparse/postgres_regress/tsearch.metadata.json +++ b/parser/testdata/deparse/postgres_regress/tsearch.metadata.json @@ -282,7 +282,6 @@ "280", "281", "282", - "283", "284", "285", "286", diff --git a/parser/testdata/deparse/postgres_regress/txid.metadata.json b/parser/testdata/deparse/postgres_regress/txid.metadata.json index c7ce9e3..a47724e 100644 --- a/parser/testdata/deparse/postgres_regress/txid.metadata.json +++ b/parser/testdata/deparse/postgres_regress/txid.metadata.json @@ -26,7 +26,6 @@ "024", "025", "026", - "027", "028", "029", "030", @@ -36,16 +35,12 @@ "034", "035", "036", - "037", - "038", - "039", "040", "041", "042", "043", "044", "045", - "046", "047" ] } diff --git a/parser/testdata/deparse/postgres_regress/vacuum.metadata.json b/parser/testdata/deparse/postgres_regress/vacuum.metadata.json index 11c34e0..f4b786f 100644 --- a/parser/testdata/deparse/postgres_regress/vacuum.metadata.json +++ b/parser/testdata/deparse/postgres_regress/vacuum.metadata.json @@ -211,8 +211,6 @@ "209", "210", "211", - "212", - "213", "214", "215", "216", diff --git a/parser/testdata/deparse/postgres_regress/window.metadata.json b/parser/testdata/deparse/postgres_regress/window.metadata.json index a1f4321..7124123 100644 --- a/parser/testdata/deparse/postgres_regress/window.metadata.json +++ b/parser/testdata/deparse/postgres_regress/window.metadata.json @@ -254,11 +254,9 @@ "252", "253", "254", - "255", "256", "257", "258", - "259", "260", "261", "262", diff --git a/parser/testdata/deparse/postgres_regress/xid.metadata.json b/parser/testdata/deparse/postgres_regress/xid.metadata.json index 7852793..2cefd65 100644 --- a/parser/testdata/deparse/postgres_regress/xid.metadata.json +++ b/parser/testdata/deparse/postgres_regress/xid.metadata.json @@ -63,7 +63,6 @@ "061", "062", "063", - "064", "065", "066", "067", @@ -73,16 +72,12 @@ "071", "072", "073", - "074", - "075", - "076", "077", "078", "079", "080", "081", "082", - "083", "084" ] } diff --git a/parser/testdata/deparse/postgres_regress/xml.metadata.json b/parser/testdata/deparse/postgres_regress/xml.metadata.json index a6ce2f7..3cfc40a 100644 --- a/parser/testdata/deparse/postgres_regress/xml.metadata.json +++ b/parser/testdata/deparse/postgres_regress/xml.metadata.json @@ -221,7 +221,6 @@ "219", "220", "221", - "222", "223", "224", "225", diff --git a/parser/testdata/parse/deparse/case.metadata.json b/parser/testdata/parse/deparse/case.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse/case.metadata.json +++ b/parser/testdata/parse/deparse/case.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse/complex_depesz.metadata.json b/parser/testdata/parse/deparse/complex_depesz.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse/complex_depesz.metadata.json +++ b/parser/testdata/parse/deparse/complex_depesz.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse/complex_gitlab.metadata.json b/parser/testdata/parse/deparse/complex_gitlab.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse/complex_gitlab.metadata.json +++ b/parser/testdata/parse/deparse/complex_gitlab.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse/complex_mattm.metadata.json b/parser/testdata/parse/deparse/complex_mattm.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse/complex_mattm.metadata.json +++ b/parser/testdata/parse/deparse/complex_mattm.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse/simple.metadata.json b/parser/testdata/parse/deparse/simple.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse/simple.metadata.json +++ b/parser/testdata/parse/deparse/simple.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse/union_2.metadata.json b/parser/testdata/parse/deparse/union_2.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse/union_2.metadata.json +++ b/parser/testdata/parse/deparse/union_2.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_01-numbers.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_01-numbers.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_01-numbers.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_01-numbers.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_02-string.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_02-string.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_02-string.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_02-string.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_03-sql-functions.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_03-sql-functions.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_03-sql-functions.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_03-sql-functions.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_04-functions.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_04-functions.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_04-functions.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_04-functions.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_06-column-aliases.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_06-column-aliases.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_06-column-aliases.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_06-column-aliases.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_07-casts.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_07-casts.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_07-casts.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_07-casts.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_08-fields-in-table.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_08-fields-in-table.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_08-fields-in-table.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_08-fields-in-table.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_09-operators.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_09-operators.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_09-operators.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_09-operators.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_10-operators.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_10-operators.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_10-operators.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_10-operators.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_11-weird-operator.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_11-weird-operator.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_11-weird-operator.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_11-weird-operator.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_12-boolean-operation.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_12-boolean-operation.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_12-boolean-operation.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_12-boolean-operation.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_13-joins.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_13-joins.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_13-joins.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_13-joins.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_14-star.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_14-star.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_14-star.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_14-star.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_15-where.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_15-where.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_15-where.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_15-where.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_16-groupby.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_16-groupby.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_16-groupby.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_16-groupby.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_17-orderby.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_17-orderby.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_17-orderby.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_17-orderby.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_18-limitoffset.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_18-limitoffset.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_18-limitoffset.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_18-limitoffset.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_19-having.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_19-having.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_19-having.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_19-having.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_20-case.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_20-case.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_20-case.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_20-case.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_21-in.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_21-in.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_21-in.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_21-in.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_22-subselect.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_22-subselect.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_22-subselect.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_22-subselect.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_23-null.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_23-null.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_23-null.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_23-null.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_24-range-function.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_24-range-function.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_24-range-function.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_24-range-function.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_25-coalesce.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_25-coalesce.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_25-coalesce.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_25-coalesce.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_26-range-subselect.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_26-range-subselect.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_26-range-subselect.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_26-range-subselect.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_27-distinct.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_27-distinct.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_27-distinct.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_27-distinct.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_28-distinct-on.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_28-distinct-on.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_28-distinct-on.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_28-distinct-on.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_29-param-ref.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_29-param-ref.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_29-param-ref.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_29-param-ref.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_30-array.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_30-array.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_30-array.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_30-array.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_31-indirection.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_31-indirection.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_31-indirection.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_31-indirection.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_32-collate.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_32-collate.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_32-collate.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_32-collate.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_33-window-functions.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_33-window-functions.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_33-window-functions.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_33-window-functions.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_34-framed-functions.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_34-framed-functions.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_34-framed-functions.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_34-framed-functions.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_35-setops.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_35-setops.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_35-setops.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_35-setops.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_36-values.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_36-values.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_36-values.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_36-values.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_37-cte.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_37-cte.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_37-cte.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_37-cte.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_38-rcte.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_38-rcte.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_38-rcte.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_38-rcte.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_39-any.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_39-any.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_39-any.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_39-any.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_40-all.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_40-all.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_40-all.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_40-all.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_41-special-a-expr.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_41-special-a-expr.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_41-special-a-expr.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_41-special-a-expr.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_42-minimax.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_42-minimax.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_42-minimax.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_42-minimax.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_43-rowexpr.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_43-rowexpr.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_43-rowexpr.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_43-rowexpr.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_44-bitstring.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_44-bitstring.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_44-bitstring.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_44-bitstring.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_45-grouping-sets.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_45-grouping-sets.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_45-grouping-sets.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_45-grouping-sets.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_46-cube.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_46-cube.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_46-cube.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_46-cube.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_47-rollup.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_47-rollup.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_47-rollup.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_47-rollup.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_48-sublink-any-all.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_48-sublink-any-all.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_48-sublink-any-all.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_48-sublink-any-all.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/08-selects_49-variadic-func-call.metadata.json b/parser/testdata/parse/deparse_depesz/08-selects_49-variadic-func-call.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/08-selects_49-variadic-func-call.metadata.json +++ b/parser/testdata/parse/deparse_depesz/08-selects_49-variadic-func-call.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/13-tablesample_01-system.metadata.json b/parser/testdata/parse/deparse_depesz/13-tablesample_01-system.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/13-tablesample_01-system.metadata.json +++ b/parser/testdata/parse/deparse_depesz/13-tablesample_01-system.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/13-tablesample_02-bernoulli.metadata.json b/parser/testdata/parse/deparse_depesz/13-tablesample_02-bernoulli.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/13-tablesample_02-bernoulli.metadata.json +++ b/parser/testdata/parse/deparse_depesz/13-tablesample_02-bernoulli.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/13-tablesample_03-repeatable.metadata.json b/parser/testdata/parse/deparse_depesz/13-tablesample_03-repeatable.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/13-tablesample_03-repeatable.metadata.json +++ b/parser/testdata/parse/deparse_depesz/13-tablesample_03-repeatable.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/14-xml_01-simple.metadata.json b/parser/testdata/parse/deparse_depesz/14-xml_01-simple.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/14-xml_01-simple.metadata.json +++ b/parser/testdata/parse/deparse_depesz/14-xml_01-simple.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/14-xml_02-concat.metadata.json b/parser/testdata/parse/deparse_depesz/14-xml_02-concat.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/14-xml_02-concat.metadata.json +++ b/parser/testdata/parse/deparse_depesz/14-xml_02-concat.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/14-xml_03-forest.metadata.json b/parser/testdata/parse/deparse_depesz/14-xml_03-forest.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/14-xml_03-forest.metadata.json +++ b/parser/testdata/parse/deparse_depesz/14-xml_03-forest.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/14-xml_04-parse.metadata.json b/parser/testdata/parse/deparse_depesz/14-xml_04-parse.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/14-xml_04-parse.metadata.json +++ b/parser/testdata/parse/deparse_depesz/14-xml_04-parse.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/14-xml_05-pi.metadata.json b/parser/testdata/parse/deparse_depesz/14-xml_05-pi.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/14-xml_05-pi.metadata.json +++ b/parser/testdata/parse/deparse_depesz/14-xml_05-pi.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/14-xml_06-root.metadata.json b/parser/testdata/parse/deparse_depesz/14-xml_06-root.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/14-xml_06-root.metadata.json +++ b/parser/testdata/parse/deparse_depesz/14-xml_06-root.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/14-xml_07-serialize.metadata.json b/parser/testdata/parse/deparse_depesz/14-xml_07-serialize.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/14-xml_07-serialize.metadata.json +++ b/parser/testdata/parse/deparse_depesz/14-xml_07-serialize.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/14-xml_08-is-document.metadata.json b/parser/testdata/parse/deparse_depesz/14-xml_08-is-document.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/14-xml_08-is-document.metadata.json +++ b/parser/testdata/parse/deparse_depesz/14-xml_08-is-document.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_01-lateral.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_01-lateral.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_01-lateral.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_01-lateral.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_02-current-row.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_02-current-row.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_02-current-row.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_02-current-row.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_03-filtered-aggregates.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_03-filtered-aggregates.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_03-filtered-aggregates.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_03-filtered-aggregates.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_04-cast-of-expression.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_04-cast-of-expression.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_04-cast-of-expression.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_04-cast-of-expression.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_05-literal-new-line.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_05-literal-new-line.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_05-literal-new-line.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_05-literal-new-line.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_06-aggregate-filter-inside-case.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_06-aggregate-filter-inside-case.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_06-aggregate-filter-inside-case.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_06-aggregate-filter-inside-case.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_07-missing-ordinality-and-order-by.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_07-missing-ordinality-and-order-by.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_07-missing-ordinality-and-order-by.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_07-missing-ordinality-and-order-by.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_08-missing-dot-before-start.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_08-missing-dot-before-start.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_08-missing-dot-before-start.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_08-missing-dot-before-start.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_09-missing-dot-before-column.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_09-missing-dot-before-column.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_09-missing-dot-before-column.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_09-missing-dot-before-column.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_10-missing-not.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_10-missing-not.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_10-missing-not.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_10-missing-not.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/16-bugs_11-distinct-aggregate.metadata.json b/parser/testdata/parse/deparse_depesz/16-bugs_11-distinct-aggregate.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/16-bugs_11-distinct-aggregate.metadata.json +++ b/parser/testdata/parse/deparse_depesz/16-bugs_11-distinct-aggregate.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_01-for-update.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_01-for-update.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_01-for-update.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_01-for-update.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_02-for-no-key-update.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_02-for-no-key-update.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_02-for-no-key-update.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_02-for-no-key-update.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_03-for-share.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_03-for-share.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_03-for-share.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_03-for-share.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_04-for-key-share.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_04-for-key-share.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_04-for-key-share.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_04-for-key-share.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_05-of-table.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_05-of-table.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_05-of-table.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_05-of-table.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_06-of-tables.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_06-of-tables.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_06-of-tables.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_06-of-tables.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_07-nowait.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_07-nowait.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_07-nowait.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_07-nowait.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_08-skip-locked.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_08-skip-locked.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_08-skip-locked.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_08-skip-locked.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/deparse_depesz/17-locking-selects_09-multi.metadata.json b/parser/testdata/parse/deparse_depesz/17-locking-selects_09-multi.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/deparse_depesz/17-locking-selects_09-multi.metadata.json +++ b/parser/testdata/parse/deparse_depesz/17-locking-selects_09-multi.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/libpg_query.metadata.json b/parser/testdata/parse/libpg_query.metadata.json index 9cdb261..0fe25fb 100644 --- a/parser/testdata/parse/libpg_query.metadata.json +++ b/parser/testdata/parse/libpg_query.metadata.json @@ -1,40 +1,18 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", "009", "010", - "011", "012", - "013", - "014", "015", "016", "017", "018", "019", - "020", - "021", - "022", - "023", - "024", "025", "026", - "027", - "028", - "029", - "030", - "031", "032", "033", "034", - "035", - "036" + "035" ] } diff --git a/parser/testdata/parse/postgres_regress/advisory_lock.metadata.json b/parser/testdata/parse/postgres_regress/advisory_lock.metadata.json index 251a33e..7de0560 100644 --- a/parser/testdata/parse/postgres_regress/advisory_lock.metadata.json +++ b/parser/testdata/parse/postgres_regress/advisory_lock.metadata.json @@ -1,42 +1,12 @@ { "todo": [ - "001", "002", - "003", - "004", - "005", - "006", - "007", "008", - "009", "010", - "011", - "012", - "013", "014", - "015", - "016", - "017", "018", - "019", - "020", - "021", "022", - "023", - "024", - "025", "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038" + "029" ] } diff --git a/parser/testdata/parse/postgres_regress/aggregates.metadata.json b/parser/testdata/parse/postgres_regress/aggregates.metadata.json index 592c419..6b9e2e1 100644 --- a/parser/testdata/parse/postgres_regress/aggregates.metadata.json +++ b/parser/testdata/parse/postgres_regress/aggregates.metadata.json @@ -4,157 +4,32 @@ "002", "003", "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", "081", "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", "109", - "110", "111", - "112", "113", - "114", "115", - "116", - "117", - "118", "119", - "120", "121", - "122", - "123", - "124", "125", - "126", "127", - "128", "129", - "130", "131", - "132", "133", "134", "135", - "136", "137", "138", - "139", "140", - "141", "142", - "143", "144", - "145", "146", - "147", "148", - "149", "150", - "151", "152", - "153", "154", - "155", "156", "157", "158", @@ -168,18 +43,12 @@ "166", "167", "168", - "169", "170", - "171", "172", "173", "174", "175", - "176", "177", - "178", - "179", - "180", "181", "182", "183", @@ -201,12 +70,6 @@ "199", "200", "201", - "202", - "203", - "204", - "205", - "206", - "207", "208", "209", "210", @@ -214,74 +77,23 @@ "212", "213", "214", - "215", "216", "217", "218", "219", "220", "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", "241", - "242", - "243", "244", - "245", - "246", "247", - "248", - "249", "250", - "251", - "252", "253", - "254", - "255", "256", - "257", - "258", "259", - "260", - "261", "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", "275", - "276", "277", - "278", "279", - "280", - "281", - "282", "283", "284", "285", @@ -292,13 +104,10 @@ "290", "291", "292", - "293", "294", "295", - "296", "297", "298", - "299", "300", "301", "302", @@ -307,65 +116,8 @@ "305", "306", "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", "357", - "358", - "359", "360", - "361", - "362", - "363", - "364", - "365", - "366", "367", "368", "369", @@ -373,32 +125,19 @@ "371", "372", "373", - "374", - "375", - "376", - "377", - "378", - "379", - "380", - "381", - "382", "383", "384", "385", - "386", - "387", "388", "389", "390", "391", "392", "393", - "394", "395", "396", "397", "398", - "399", "400", "401", "402", @@ -422,7 +161,6 @@ "420", "421", "422", - "423", "424", "425", "426", @@ -444,14 +182,12 @@ "442", "443", "444", - "445", "446", "447", "448", "449", "450", "451", - "452", "453", "454", "455", @@ -461,21 +197,13 @@ "459", "460", "461", - "462", "463", - "464", "465", - "466", - "467", - "468", - "469", - "470", "471", "472", "473", "474", "475", - "476", "477", "478", "479", @@ -502,10 +230,6 @@ "500", "501", "502", - "503", - "504", - "505", - "506", "507", "508", "509", diff --git a/parser/testdata/parse/postgres_regress/alter_generic.metadata.json b/parser/testdata/parse/postgres_regress/alter_generic.metadata.json index d5998bc..28b5eba 100644 --- a/parser/testdata/parse/postgres_regress/alter_generic.metadata.json +++ b/parser/testdata/parse/postgres_regress/alter_generic.metadata.json @@ -50,7 +50,6 @@ "048", "049", "050", - "051", "052", "053", "054", @@ -69,7 +68,6 @@ "067", "068", "069", - "070", "071", "072", "073", @@ -78,8 +76,6 @@ "076", "077", "078", - "079", - "080", "081", "082", "083", @@ -92,7 +88,6 @@ "090", "091", "092", - "093", "094", "095", "096", @@ -105,7 +100,6 @@ "103", "104", "105", - "106", "107", "108", "109", @@ -148,8 +142,6 @@ "146", "147", "148", - "149", - "150", "151", "152", "153", @@ -266,7 +258,6 @@ "264", "265", "266", - "267", "268", "269", "270", @@ -285,7 +276,6 @@ "283", "284", "285", - "286", "287", "288", "289", @@ -304,7 +294,6 @@ "302", "303", "304", - "305", "306", "307", "308", @@ -313,7 +302,6 @@ "311", "312", "313", - "314", "315", "316", "317", @@ -322,7 +310,6 @@ "320", "321", "322", - "323", "324", "325", "326", diff --git a/parser/testdata/parse/postgres_regress/alter_operator.metadata.json b/parser/testdata/parse/postgres_regress/alter_operator.metadata.json index 8836c0c..51ee963 100644 --- a/parser/testdata/parse/postgres_regress/alter_operator.metadata.json +++ b/parser/testdata/parse/postgres_regress/alter_operator.metadata.json @@ -3,21 +3,12 @@ "001", "002", "003", - "004", "005", "006", - "007", - "008", "009", "010", - "011", - "012", "013", - "014", - "015", "016", - "017", - "018", "019", "020", "021", @@ -34,17 +25,13 @@ "032", "033", "034", - "035", "036", - "037", "038", "039", - "040", "041", "042", "043", "044", - "045", "046", "047", "048", @@ -53,7 +40,6 @@ "051", "052", "053", - "054", "055", "056", "057", diff --git a/parser/testdata/parse/postgres_regress/alter_table.metadata.json b/parser/testdata/parse/postgres_regress/alter_table.metadata.json index bfe6d13..2349700 100644 --- a/parser/testdata/parse/postgres_regress/alter_table.metadata.json +++ b/parser/testdata/parse/postgres_regress/alter_table.metadata.json @@ -32,7 +32,6 @@ "030", "031", "032", - "033", "034", "035", "036", @@ -58,7 +57,6 @@ "056", "057", "058", - "059", "060", "061", "062", @@ -70,12 +68,7 @@ "068", "069", "070", - "071", - "072", "073", - "074", - "075", - "076", "077", "078", "079", @@ -93,22 +86,15 @@ "091", "092", "093", - "094", - "095", "096", - "097", - "098", "099", "100", - "1000", "1001", "1002", "1003", - "1004", "1005", "1006", "1007", - "1008", "1009", "101", "1010", @@ -118,13 +104,10 @@ "1014", "1015", "1016", - "1017", "1018", "1019", - "102", "1020", "1021", - "1022", "1023", "1024", "1025", @@ -133,17 +116,12 @@ "1028", "1029", "103", - "1030", "1031", - "1032", "1033", - "1034", "1035", - "1036", "1037", "1038", "1039", - "104", "1040", "1041", "1042", @@ -180,9 +158,6 @@ "1070", "1071", "1072", - "1073", - "1074", - "1075", "1076", "1077", "1078", @@ -304,9 +279,6 @@ "1183", "1184", "1185", - "1186", - "1187", - "1188", "1189", "119", "1190", @@ -314,22 +286,14 @@ "1192", "1193", "1194", - "1195", - "1196", - "1197", "1198", "1199", - "120", "1200", "1201", "1202", "1203", "1204", - "1205", - "1206", - "1207", "1208", - "1209", "121", "1210", "1211", @@ -349,20 +313,17 @@ "1224", "1225", "1226", - "1227", "1228", "1229", "123", "1230", "1231", "1232", - "1233", "1234", "1235", "1236", "1237", "1238", - "1239", "124", "1240", "1241", @@ -370,11 +331,9 @@ "1243", "1244", "1245", - "1246", "1247", "1248", "1249", - "125", "1250", "1251", "1252", @@ -429,7 +388,6 @@ "1297", "1298", "1299", - "130", "1300", "1301", "1302", @@ -485,8 +443,6 @@ "1348", "1349", "135", - "1350", - "1351", "1352", "1353", "1354", @@ -539,7 +495,6 @@ "1397", "1398", "1399", - "140", "1400", "1401", "1402", @@ -556,7 +511,6 @@ "1412", "1413", "1414", - "1415", "1416", "1417", "1418", @@ -619,14 +573,11 @@ "147", "1470", "1471", - "1472", - "1473", "1474", "1475", "1476", "1477", "1478", - "1479", "148", "1480", "1481", @@ -681,7 +632,6 @@ "1526", "1527", "1528", - "1529", "153", "1530", "1531", @@ -694,7 +644,6 @@ "1538", "1539", "154", - "1540", "1541", "1542", "1543", @@ -757,7 +706,6 @@ "1595", "1596", "1597", - "1598", "1599", "160", "1600", @@ -790,14 +738,10 @@ "1625", "1626", "1627", - "1628", "1629", "163", - "1630", "1631", - "1632", "1633", - "1634", "1635", "1636", "1637", @@ -859,7 +803,6 @@ "203", "204", "205", - "206", "207", "208", "209", @@ -880,7 +823,6 @@ "224", "225", "226", - "227", "228", "229", "230", @@ -948,8 +890,6 @@ "292", "293", "294", - "295", - "296", "297", "298", "299", @@ -989,7 +929,6 @@ "333", "334", "335", - "336", "337", "338", "339", @@ -1004,7 +943,6 @@ "348", "349", "350", - "351", "352", "353", "354", @@ -1180,7 +1118,6 @@ "524", "525", "526", - "527", "528", "529", "530", @@ -1191,7 +1128,6 @@ "535", "536", "537", - "538", "539", "540", "541", @@ -1201,21 +1137,6 @@ "545", "546", "547", - "548", - "549", - "550", - "551", - "552", - "553", - "554", - "555", - "556", - "557", - "558", - "559", - "560", - "561", - "562", "563", "564", "565", @@ -1240,7 +1161,6 @@ "584", "585", "586", - "587", "588", "589", "590", @@ -1279,15 +1199,11 @@ "623", "624", "625", - "626", "627", - "628", - "629", "630", "631", "632", "633", - "634", "635", "636", "637", @@ -1301,11 +1217,7 @@ "645", "646", "647", - "648", - "649", "650", - "651", - "652", "653", "654", "655", @@ -1322,11 +1234,8 @@ "666", "667", "668", - "669", "670", - "671", "672", - "673", "674", "675", "676", @@ -1352,15 +1261,12 @@ "696", "697", "698", - "699", "700", - "701", "702", "703", "704", "705", "706", - "707", "708", "709", "710", @@ -1378,7 +1284,6 @@ "722", "723", "724", - "725", "726", "727", "728", @@ -1388,13 +1293,11 @@ "732", "733", "734", - "735", "736", "737", "738", "739", "740", - "741", "742", "743", "744", @@ -1402,36 +1305,25 @@ "746", "747", "748", - "749", "750", - "751", "752", "753", "754", "755", - "756", "757", - "758", "759", - "760", "761", - "762", - "763", "764", "765", "766", "767", "768", - "769", "770", "771", "772", - "773", "774", "775", - "776", "777", - "778", "779", "780", "781", @@ -1439,7 +1331,6 @@ "783", "784", "785", - "786", "787", "788", "789", @@ -1456,9 +1347,7 @@ "800", "801", "802", - "803", "804", - "805", "806", "807", "808", @@ -1498,11 +1387,7 @@ "842", "843", "844", - "845", - "846", "847", - "848", - "849", "850", "851", "852", @@ -1514,27 +1399,20 @@ "858", "859", "860", - "861", "862", "863", - "864", "865", - "866", "867", "868", "869", "870", "871", - "872", "873", - "874", "875", "876", "877", "878", - "879", "880", - "881", "882", "883", "884", @@ -1564,10 +1442,8 @@ "908", "909", "910", - "911", "912", "913", - "914", "915", "916", "917", @@ -1579,19 +1455,11 @@ "923", "924", "925", - "926", - "927", "928", "929", "930", "931", "932", - "933", - "934", - "935", - "936", - "937", - "938", "939", "940", "941", @@ -1604,54 +1472,41 @@ "948", "949", "950", - "951", "952", "953", "954", - "955", "956", "957", "958", - "959", "960", "961", "962", - "963", "964", "965", "966", - "967", "968", "969", "970", - "971", "972", "973", "974", - "975", "976", "977", "978", - "979", "980", "981", "982", - "983", "984", "985", "986", - "987", "988", "989", "990", - "991", "992", "993", "994", - "995", "996", "997", - "998", "999" ] } diff --git a/parser/testdata/parse/postgres_regress/amutils.metadata.json b/parser/testdata/parse/postgres_regress/amutils.metadata.json index 92b8f9e..9048bdc 100644 --- a/parser/testdata/parse/postgres_regress/amutils.metadata.json +++ b/parser/testdata/parse/postgres_regress/amutils.metadata.json @@ -1,14 +1,7 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", "006", "007", - "008", - "009", - "010" + "009" ] } diff --git a/parser/testdata/parse/postgres_regress/arrays.metadata.json b/parser/testdata/parse/postgres_regress/arrays.metadata.json index a8dc578..2988a90 100644 --- a/parser/testdata/parse/postgres_regress/arrays.metadata.json +++ b/parser/testdata/parse/postgres_regress/arrays.metadata.json @@ -12,63 +12,26 @@ "010", "011", "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", "020", "021", "022", - "023", - "024", - "025", "026", - "027", "028", - "029", "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", "044", "045", "046", - "047", "048", "049", "050", - "051", - "052", - "053", - "054", "055", - "056", "057", - "058", "059", - "060", "061", "062", "063", "064", "065", - "066", - "067", - "068", - "069", "070", "071", "072", @@ -76,36 +39,21 @@ "074", "075", "076", - "077", "078", - "079", "080", - "081", "082", - "083", "084", - "085", "086", - "087", "088", - "089", "090", - "091", "092", - "093", "094", - "095", "096", - "097", "098", - "099", "100", - "101", "102", "103", - "104", "105", - "106", "107", "108", "109", @@ -128,100 +76,7 @@ "126", "127", "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", "223", "224", "225", @@ -231,8 +86,6 @@ "229", "230", "231", - "232", - "233", "234", "235", "236", @@ -245,244 +98,36 @@ "243", "244", "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", "300", "301", "302", - "303", "304", - "305", "306", - "307", "308", - "309", "310", - "311", "312", "313", "314", "315", - "316", - "317", "318", "319", "320", "321", "322", - "323", - "324", "325", "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", - "376", - "377", - "378", - "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "408", - "409", - "410", - "411", - "412", - "413", - "414", - "415", - "416", - "417", - "418", - "419", - "420", - "421", - "422", - "423", - "424", - "425", - "426", - "427", - "428", - "429", - "430", - "431", - "432", - "433", - "434", - "435", - "436", - "437", - "438", - "439", - "440", - "441", - "442", - "443", "444", "445", - "446", "447", - "448", "449", "450", "451", "452", "453", - "454", "455", - "456", "457", "458", - "459", "460", - "461", - "462", - "463", - "464", - "465", - "466", - "467", - "468", - "469", - "470", - "471", - "472", - "473", - "474", - "475", - "476", - "477", - "478", - "479", - "480", - "481", - "482", - "483", - "484" + "461" ] } diff --git a/parser/testdata/parse/postgres_regress/async.metadata.json b/parser/testdata/parse/postgres_regress/async.metadata.json index 4739b17..72d3a4f 100644 --- a/parser/testdata/parse/postgres_regress/async.metadata.json +++ b/parser/testdata/parse/postgres_regress/async.metadata.json @@ -1,15 +1,8 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", "007", "008", "009", - "010", - "011" + "010" ] } diff --git a/parser/testdata/parse/postgres_regress/bit.metadata.json b/parser/testdata/parse/postgres_regress/bit.metadata.json index 0b25d44..25798e7 100644 --- a/parser/testdata/parse/postgres_regress/bit.metadata.json +++ b/parser/testdata/parse/postgres_regress/bit.metadata.json @@ -6,131 +6,35 @@ "004", "005", "006", - "007", "008", "009", "010", "011", "012", "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", "030", "031", "032", - "033", - "034", - "035", "036", "037", "038", "039", - "040", - "041", - "042", "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", "085", "086", "087", "088", "089", "090", - "091", - "092", - "093", - "094", - "095", "096", "097", "098", "099", "100", "101", - "102", - "103", - "104", "105", "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132" + "121" ] } diff --git a/parser/testdata/parse/postgres_regress/bitmapops.metadata.json b/parser/testdata/parse/postgres_regress/bitmapops.metadata.json index 92b8f9e..4fd3b1b 100644 --- a/parser/testdata/parse/postgres_regress/bitmapops.metadata.json +++ b/parser/testdata/parse/postgres_regress/bitmapops.metadata.json @@ -7,8 +7,6 @@ "005", "006", "007", - "008", - "009", "010" ] } diff --git a/parser/testdata/parse/postgres_regress/boolean.metadata.json b/parser/testdata/parse/postgres_regress/boolean.metadata.json index 463f4d4..d405a45 100644 --- a/parser/testdata/parse/postgres_regress/boolean.metadata.json +++ b/parser/testdata/parse/postgres_regress/boolean.metadata.json @@ -1,99 +1,22 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", "044", "045", "046", "047", - "048", - "049", - "050", - "051", "052", - "053", "054", "055", "056", "057", "058", "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", "073", "074", "075", "076", - "077", "078", "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", "095", "096", "097", diff --git a/parser/testdata/parse/postgres_regress/box.metadata.json b/parser/testdata/parse/postgres_regress/box.metadata.json index 8b15b4c..ce03273 100644 --- a/parser/testdata/parse/postgres_regress/box.metadata.json +++ b/parser/testdata/parse/postgres_regress/box.metadata.json @@ -11,52 +11,22 @@ "009", "010", "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", "030", "031", "032", "033", "034", - "035", "036", - "037", "038", - "039", "040", - "041", "042", - "043", "044", - "045", "046", - "047", "048", - "049", "050", - "051", "052", - "053", "054", - "055", "056", - "057", "058", "059", "060", @@ -73,33 +43,14 @@ "071", "072", "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", "087", "088", "089", "090", - "091", "092", "093", - "094", "095", "096", - "097", - "098", - "099", - "100", - "101" + "097" ] } diff --git a/parser/testdata/parse/postgres_regress/brin.metadata.json b/parser/testdata/parse/postgres_regress/brin.metadata.json index af46f65..2a0301f 100644 --- a/parser/testdata/parse/postgres_regress/brin.metadata.json +++ b/parser/testdata/parse/postgres_regress/brin.metadata.json @@ -10,33 +10,17 @@ "008", "009", "010", - "011", "012", "013", "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", "022", "023", "024", - "025", - "026", - "027", - "028", - "029", - "030", "031", "032", "033", "034", "035", - "036", - "037", "038", "039", "040", @@ -55,7 +39,6 @@ "053", "054", "055", - "056", "057", "058", "059", diff --git a/parser/testdata/parse/postgres_regress/brin_bloom.metadata.json b/parser/testdata/parse/postgres_regress/brin_bloom.metadata.json index 32e0be1..d5d6f62 100644 --- a/parser/testdata/parse/postgres_regress/brin_bloom.metadata.json +++ b/parser/testdata/parse/postgres_regress/brin_bloom.metadata.json @@ -13,26 +13,12 @@ "011", "012", "013", - "014", "015", "016", "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", "025", "026", "027", - "028", - "029", - "030", - "031", - "032", - "033", "034", "035", "036", diff --git a/parser/testdata/parse/postgres_regress/brin_multi.metadata.json b/parser/testdata/parse/postgres_regress/brin_multi.metadata.json index 643d115..8c72158 100644 --- a/parser/testdata/parse/postgres_regress/brin_multi.metadata.json +++ b/parser/testdata/parse/postgres_regress/brin_multi.metadata.json @@ -14,7 +14,6 @@ "012", "013", "014", - "015", "016", "017", "018", @@ -24,13 +23,6 @@ "022", "023", "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", "032", "033", "034", @@ -38,12 +30,6 @@ "036", "037", "038", - "039", - "040", - "041", - "042", - "043", - "044", "045", "046", "047", @@ -56,68 +42,16 @@ "054", "055", "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", "077", "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", "099", "100", "101", "102", "103", "104", - "105", - "106", - "107", - "108", - "109", - "110", "111", "112", - "113", - "114", - "115", - "116", - "117", - "118", "119", "120", "121", diff --git a/parser/testdata/parse/postgres_regress/btree_index.metadata.json b/parser/testdata/parse/postgres_regress/btree_index.metadata.json index 11ed4d1..40274e6 100644 --- a/parser/testdata/parse/postgres_regress/btree_index.metadata.json +++ b/parser/testdata/parse/postgres_regress/btree_index.metadata.json @@ -16,45 +16,24 @@ "014", "015", "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", "029", "030", "031", "032", - "033", "034", - "035", "036", - "037", "038", - "039", "040", - "041", "042", "043", "044", "045", - "046", "047", - "048", "049", "050", "051", "052", - "053", "054", - "055", "056", "057", "058", @@ -63,13 +42,9 @@ "061", "062", "063", - "064", "065", - "066", "067", - "068", "069", - "070", "071", "072", "073", diff --git a/parser/testdata/parse/postgres_regress/case.metadata.json b/parser/testdata/parse/postgres_regress/case.metadata.json index f47f175..fc293e5 100644 --- a/parser/testdata/parse/postgres_regress/case.metadata.json +++ b/parser/testdata/parse/postgres_regress/case.metadata.json @@ -12,55 +12,27 @@ "010", "011", "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", "033", "034", "035", "036", - "037", "038", - "039", "040", - "041", "042", "043", - "044", "045", "046", "047", "048", - "049", "050", "051", "052", "053", "054", "055", - "056", - "057", "058", "059", "060", - "061", "062", "063", "064" diff --git a/parser/testdata/parse/postgres_regress/char.metadata.json b/parser/testdata/parse/postgres_regress/char.metadata.json index efb3a10..1a2b1bc 100644 --- a/parser/testdata/parse/postgres_regress/char.metadata.json +++ b/parser/testdata/parse/postgres_regress/char.metadata.json @@ -1,6 +1,5 @@ { "todo": [ - "001", "002", "003", "004", @@ -10,27 +9,7 @@ "008", "009", "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032" + "019" ] } diff --git a/parser/testdata/parse/postgres_regress/circle.metadata.json b/parser/testdata/parse/postgres_regress/circle.metadata.json index edb706f..2aa574e 100644 --- a/parser/testdata/parse/postgres_regress/circle.metadata.json +++ b/parser/testdata/parse/postgres_regress/circle.metadata.json @@ -14,13 +14,6 @@ "012", "013", "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022" + "015" ] } diff --git a/parser/testdata/parse/postgres_regress/cluster.metadata.json b/parser/testdata/parse/postgres_regress/cluster.metadata.json index 479ae3b..e66d508 100644 --- a/parser/testdata/parse/postgres_regress/cluster.metadata.json +++ b/parser/testdata/parse/postgres_regress/cluster.metadata.json @@ -46,20 +46,10 @@ "044", "045", "046", - "047", - "048", - "049", - "050", "051", - "052", "053", - "054", - "055", - "056", "057", - "058", "059", - "060", "061", "062", "063", @@ -77,7 +67,6 @@ "075", "076", "077", - "078", "079", "080", "081", @@ -91,12 +80,10 @@ "089", "090", "091", - "092", "093", "094", "095", "096", - "097", "098", "099", "100", @@ -109,15 +96,11 @@ "107", "108", "109", - "110", "111", - "112", "113", - "114", "115", "116", "117", - "118", "119", "120", "121", @@ -138,7 +121,6 @@ "136", "137", "138", - "139", "140", "141", "142", @@ -157,7 +139,6 @@ "155", "156", "157", - "158", "159", "160", "161", @@ -165,7 +146,6 @@ "163", "164", "165", - "166", "167", "168", "169", @@ -175,27 +155,19 @@ "173", "174", "175", - "176", "177", - "178", "179", "180", - "181", "182", "183", "184", - "185", "186", - "187", "188", "189", - "190", "191", "192", "193", - "194", "195", - "196", "197", "198", "199", diff --git a/parser/testdata/parse/postgres_regress/collate.icu.utf8.metadata.json b/parser/testdata/parse/postgres_regress/collate.icu.utf8.metadata.json index faccb98..15d6b15 100644 --- a/parser/testdata/parse/postgres_regress/collate.icu.utf8.metadata.json +++ b/parser/testdata/parse/postgres_regress/collate.icu.utf8.metadata.json @@ -1,6 +1,5 @@ { "todo": [ - "001", "002", "003", "004", @@ -14,141 +13,36 @@ "012", "013", "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", "023", "024", "025", "026", - "027", "028", "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", "040", "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", "062", "063", - "064", - "065", - "066", - "067", - "068", - "069", "070", "071", "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", "120", "121", "122", - "123", - "124", "125", - "126", "127", - "128", - "129", - "130", - "131", - "132", - "133", "134", - "135", - "136", - "137", "138", "139", "140", "141", "142", "143", - "144", "145", "146", - "147", "148", - "149", "150", "151", "152", @@ -170,7 +64,6 @@ "168", "169", "170", - "171", "172", "173", "174", @@ -178,15 +71,12 @@ "176", "177", "178", - "179", "180", "181", "182", - "183", "184", "185", "186", - "187", "188", "189", "190", @@ -201,37 +91,25 @@ "199", "200", "201", - "202", - "203", "204", "205", - "206", - "207", "208", "209", "210", - "211", "212", "213", "214", - "215", "216", "217", - "218", "219", - "220", "221", "222", "223", - "224", "225", "226", - "227", "228", "229", "230", - "231", - "232", "233", "234", "235", @@ -239,52 +117,24 @@ "237", "238", "239", - "240", - "241", - "242", "243", "244", "245", - "246", - "247", - "248", "249", "250", - "251", - "252", "253", - "254", "255", - "256", "257", "258", "259", "260", "261", "262", - "263", - "264", - "265", - "266", - "267", - "268", "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", "277", - "278", - "279", - "280", "281", "282", "283", - "284", - "285", "286", "287", "288", @@ -292,27 +142,9 @@ "290", "291", "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", "309", "310", "311", - "312", - "313", "314", "315", "316", @@ -320,42 +152,14 @@ "318", "319", "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", "337", "338", "339", - "340", - "341", "342", "343", "344", "345", - "346", - "347", - "348", - "349", "350", - "351", - "352", - "353", - "354", - "355", - "356", "357", "358", "359", @@ -363,98 +167,73 @@ "361", "362", "363", - "364", "365", "366", "367", "368", "369", - "370", - "371", - "372", - "373", "374", "375", "376", "377", "378", "379", - "380", - "381", "382", - "383", "384", - "385", - "386", "387", "388", "389", "390", "391", "392", - "393", - "394", "395", - "396", "397", - "398", - "399", "400", "401", "402", "403", - "404", "405", "406", "407", "408", - "409", "410", "411", "412", "413", "414", - "415", "416", "417", "418", "419", "420", - "421", "422", "423", "424", "425", "426", - "427", "428", "429", "430", "431", "432", - "433", "434", "435", "436", "437", - "438", "439", "440", "441", "442", - "443", "444", "445", "446", "447", "448", - "449", "450", "451", "452", "453", "454", - "455", "456", "457", "458", @@ -464,37 +243,22 @@ "462", "463", "464", - "465", "466", "467", - "468", "469", - "470", "471", "472", - "473", "474", "475", - "476", "477", - "478", "479", "480", - "481", "482", "483", "484", "485", "486", "487", - "488", - "489", - "490", - "491", - "492", - "493", - "494", - "495", "496", "497", "498", diff --git a/parser/testdata/parse/postgres_regress/collate.linux.utf8.metadata.json b/parser/testdata/parse/postgres_regress/collate.linux.utf8.metadata.json index 648a6d3..81057e1 100644 --- a/parser/testdata/parse/postgres_regress/collate.linux.utf8.metadata.json +++ b/parser/testdata/parse/postgres_regress/collate.linux.utf8.metadata.json @@ -1,6 +1,5 @@ { "todo": [ - "001", "002", "003", "004", @@ -14,144 +13,34 @@ "012", "013", "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", "023", "024", "025", "026", - "027", "028", "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", "040", "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", "062", "063", - "064", - "065", - "066", - "067", - "068", - "069", "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", "078", "079", "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", "128", "129", "130", - "131", - "132", "133", - "134", "135", - "136", - "137", - "138", - "139", - "140", - "141", "142", - "143", - "144", - "145", "146", "147", "148", "149", "150", "151", - "152", "153", "154", "155", @@ -163,7 +52,6 @@ "161", "162", "163", - "164", "165", "166", "167", @@ -171,15 +59,12 @@ "169", "170", "171", - "172", "173", "174", "175", - "176", "177", "178", "179", - "180", "181", "182", "183", @@ -194,11 +79,8 @@ "192", "193", "194", - "195", - "196", "197", "198", - "199", "200", "201", "202", diff --git a/parser/testdata/parse/postgres_regress/collate.metadata.json b/parser/testdata/parse/postgres_regress/collate.metadata.json index 267f283..b19dbe0 100644 --- a/parser/testdata/parse/postgres_regress/collate.metadata.json +++ b/parser/testdata/parse/postgres_regress/collate.metadata.json @@ -8,94 +8,27 @@ "006", "007", "008", - "009", - "010", - "011", - "012", "013", "014", "015", "016", - "017", "018", "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", "028", "029", - "030", - "031", - "032", "033", "034", "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", "083", - "084", - "085", - "086", "087", - "088", - "089", "090", "091", "092", "093", "094", "095", - "096", "097", "098", "099", @@ -115,7 +48,6 @@ "113", "114", "115", - "116", "117", "118", "119", @@ -128,10 +60,6 @@ "126", "127", "128", - "129", - "130", - "131", - "132", "133", "134", "135", diff --git a/parser/testdata/parse/postgres_regress/collate.utf8.metadata.json b/parser/testdata/parse/postgres_regress/collate.utf8.metadata.json index 5d34ab7..51f45d8 100644 --- a/parser/testdata/parse/postgres_regress/collate.utf8.metadata.json +++ b/parser/testdata/parse/postgres_regress/collate.utf8.metadata.json @@ -1,6 +1,5 @@ { "todo": [ - "001", "002", "003", "004", @@ -8,21 +7,6 @@ "006", "007", "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024" + "010" ] } diff --git a/parser/testdata/parse/postgres_regress/collate.windows.win1252.metadata.json b/parser/testdata/parse/postgres_regress/collate.windows.win1252.metadata.json index a4f4300..55e8735 100644 --- a/parser/testdata/parse/postgres_regress/collate.windows.win1252.metadata.json +++ b/parser/testdata/parse/postgres_regress/collate.windows.win1252.metadata.json @@ -1,6 +1,5 @@ { "todo": [ - "001", "002", "003", "004", @@ -14,115 +13,30 @@ "012", "013", "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", "023", "024", "025", "026", - "027", "028", "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", "053", "054", - "055", - "056", "057", "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", "093", - "094", - "095", - "096", - "097", - "098", "099", "100", "101", - "102", - "103", "104", - "105", "106", - "107", - "108", - "109", - "110", - "111", - "112", "113", - "114", - "115", - "116", "117", "118", "119", "120", "121", "122", - "123", "124", "125", "126", @@ -134,7 +48,6 @@ "132", "133", "134", - "135", "136", "137", "138", @@ -142,15 +55,12 @@ "140", "141", "142", - "143", "144", "145", "146", - "147", "148", "149", "150", - "151", "152", "153", "154", @@ -165,8 +75,6 @@ "163", "164", "165", - "166", - "167", "168", "169", "170", diff --git a/parser/testdata/parse/postgres_regress/combocid.metadata.json b/parser/testdata/parse/postgres_regress/combocid.metadata.json index 7d59f7e..ac484dd 100644 --- a/parser/testdata/parse/postgres_regress/combocid.metadata.json +++ b/parser/testdata/parse/postgres_regress/combocid.metadata.json @@ -14,21 +14,16 @@ "012", "013", "014", - "015", "016", "017", - "018", "019", - "020", "021", - "022", "023", "024", "025", "026", "027", "028", - "029", "030", "031", "032", @@ -41,25 +36,17 @@ "039", "040", "041", - "042", "043", - "044", - "045", "046", - "047", "048", - "049", "050", - "051", "052", "053", "054", - "055", "056", "057", "058", "059", - "060", "061", "062" ] diff --git a/parser/testdata/parse/postgres_regress/comments.metadata.json b/parser/testdata/parse/postgres_regress/comments.metadata.json index 980156f..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/comments.metadata.json +++ b/parser/testdata/parse/postgres_regress/comments.metadata.json @@ -1,10 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/compression.metadata.json b/parser/testdata/parse/postgres_regress/compression.metadata.json index 8e8d1f7..ecf4cb4 100644 --- a/parser/testdata/parse/postgres_regress/compression.metadata.json +++ b/parser/testdata/parse/postgres_regress/compression.metadata.json @@ -6,32 +6,19 @@ "004", "005", "006", - "007", - "008", - "009", - "010", - "011", - "012", "013", "014", "015", - "016", "017", "018", "019", "020", "021", - "022", "023", - "024", "025", "026", "027", - "028", "029", - "030", - "031", - "032", "033", "034", "035", @@ -40,18 +27,13 @@ "038", "039", "040", - "041", "042", - "043", - "044", "045", "046", "047", "048", "049", "050", - "051", - "052", "053", "054", "055", @@ -62,27 +44,17 @@ "060", "061", "062", - "063", "064", "065", "066", "067", "068", "069", - "070", - "071", - "072", "073", - "074", "075", "076", "077", "078", - "079", - "080", - "081", - "082", - "083", "084", "085", "086", diff --git a/parser/testdata/parse/postgres_regress/constraints.metadata.json b/parser/testdata/parse/postgres_regress/constraints.metadata.json index 60d70f4..731b9ae 100644 --- a/parser/testdata/parse/postgres_regress/constraints.metadata.json +++ b/parser/testdata/parse/postgres_regress/constraints.metadata.json @@ -6,14 +6,12 @@ "004", "005", "006", - "007", "008", "009", "010", "011", "012", "013", - "014", "015", "016", "017", @@ -25,7 +23,6 @@ "023", "024", "025", - "026", "027", "028", "029", @@ -34,12 +31,9 @@ "032", "033", "034", - "035", "036", "037", "038", - "039", - "040", "041", "042", "043", @@ -47,21 +41,15 @@ "045", "046", "047", - "048", "049", "050", "051", "052", - "053", - "054", "055", - "056", "057", - "058", "059", "060", "061", - "062", "063", "064", "065", @@ -69,7 +57,6 @@ "067", "068", "069", - "070", "071", "072", "073", @@ -90,22 +77,17 @@ "088", "089", "090", - "091", "092", "093", "094", - "095", "096", "097", "098", "099", "100", - "101", "102", "103", - "104", "105", - "106", "107", "108", "109", @@ -113,7 +95,6 @@ "111", "112", "113", - "114", "115", "116", "117", @@ -122,7 +103,6 @@ "120", "121", "122", - "123", "124", "125", "126", @@ -135,7 +115,6 @@ "133", "134", "135", - "136", "137", "138", "139", @@ -146,7 +125,6 @@ "144", "145", "146", - "147", "148", "149", "150", @@ -155,7 +133,6 @@ "153", "154", "155", - "156", "157", "158", "159", @@ -167,13 +144,11 @@ "165", "166", "167", - "168", "169", "170", "171", "172", "173", - "174", "175", "176", "177", @@ -184,7 +159,6 @@ "182", "183", "184", - "185", "186", "187", "188", @@ -200,7 +174,6 @@ "198", "199", "200", - "201", "202", "203", "204", @@ -213,7 +186,6 @@ "211", "212", "213", - "214", "215", "216", "217", @@ -222,7 +194,6 @@ "220", "221", "222", - "223", "224", "225", "226", @@ -248,14 +219,11 @@ "246", "247", "248", - "249", "250", "251", "252", "253", - "254", "255", - "256", "257", "258", "259", @@ -286,7 +254,6 @@ "284", "285", "286", - "287", "288", "289", "290", diff --git a/parser/testdata/parse/postgres_regress/conversion.metadata.json b/parser/testdata/parse/postgres_regress/conversion.metadata.json index 8836c0c..44428ef 100644 --- a/parser/testdata/parse/postgres_regress/conversion.metadata.json +++ b/parser/testdata/parse/postgres_regress/conversion.metadata.json @@ -1,7 +1,6 @@ { "todo": [ "001", - "002", "003", "004", "005", @@ -19,51 +18,19 @@ "017", "018", "019", - "020", - "021", - "022", - "023", - "024", "025", "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", "034", "035", - "036", - "037", "038", "039", - "040", - "041", - "042", "043", "044", - "045", - "046", "047", "048", - "049", - "050", - "051", - "052", "053", "054", - "055", - "056", - "057", "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065" + "059" ] } diff --git a/parser/testdata/parse/postgres_regress/copy.metadata.json b/parser/testdata/parse/postgres_regress/copy.metadata.json index 8e8d1f7..d2a5017 100644 --- a/parser/testdata/parse/postgres_regress/copy.metadata.json +++ b/parser/testdata/parse/postgres_regress/copy.metadata.json @@ -8,11 +8,9 @@ "006", "007", "008", - "009", "010", "011", "012", - "013", "014", "015", "016", @@ -34,18 +32,14 @@ "032", "033", "034", - "035", "036", "037", "038", "039", - "040", "041", "042", "043", "044", - "045", - "046", "047", "048", "049", @@ -68,13 +62,11 @@ "066", "067", "068", - "069", "070", "071", "072", "073", "074", - "075", "076", "077", "078", @@ -85,7 +77,6 @@ "083", "084", "085", - "086", "087" ] } diff --git a/parser/testdata/parse/postgres_regress/copyselect.metadata.json b/parser/testdata/parse/postgres_regress/copyselect.metadata.json index 56098cb..57687ba 100644 --- a/parser/testdata/parse/postgres_regress/copyselect.metadata.json +++ b/parser/testdata/parse/postgres_regress/copyselect.metadata.json @@ -19,7 +19,6 @@ "017", "018", "019", - "020", "021" ] } diff --git a/parser/testdata/parse/postgres_regress/create_aggregate.metadata.json b/parser/testdata/parse/postgres_regress/create_aggregate.metadata.json index f53b7f4..4fbedec 100644 --- a/parser/testdata/parse/postgres_regress/create_aggregate.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_aggregate.metadata.json @@ -39,13 +39,10 @@ "037", "038", "039", - "040", "041", "042", "043", - "044", "045", - "046", "047", "048", "049", diff --git a/parser/testdata/parse/postgres_regress/create_am.metadata.json b/parser/testdata/parse/postgres_regress/create_am.metadata.json index 83b3df4..000db02 100644 --- a/parser/testdata/parse/postgres_regress/create_am.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_am.metadata.json @@ -12,11 +12,8 @@ "010", "011", "012", - "013", "014", - "015", "016", - "017", "018", "019", "020", @@ -29,19 +26,13 @@ "027", "028", "029", - "030", "031", "032", - "033", "034", - "035", - "036", "037", "038", "039", - "040", "041", - "042", "043", "044", "045", @@ -51,56 +42,34 @@ "049", "050", "051", - "052", - "053", "054", - "055", "056", - "057", "058", - "059", "060", - "061", - "062", "063", "064", "065", - "066", "067", "068", - "069", "070", "071", - "072", "073", - "074", - "075", "076", "077", "078", "079", "080", "081", - "082", "083", "084", "085", "086", - "087", - "088", "089", - "090", - "091", "092", "093", - "094", - "095", "096", "097", - "098", "099", - "100", - "101", "102", "103", "104", @@ -109,7 +78,6 @@ "107", "108", "109", - "110", "111", "112", "113", @@ -117,14 +85,12 @@ "115", "116", "117", - "118", "119", "120", "121", "122", "123", "124", - "125", "126", "127", "128", @@ -134,7 +100,6 @@ "132", "133", "134", - "135", "136", "137", "138", diff --git a/parser/testdata/parse/postgres_regress/create_cast.metadata.json b/parser/testdata/parse/postgres_regress/create_cast.metadata.json index 5d34ab7..1d443af 100644 --- a/parser/testdata/parse/postgres_regress/create_cast.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_cast.metadata.json @@ -5,24 +5,15 @@ "003", "004", "005", - "006", "007", - "008", - "009", "010", "011", - "012", - "013", "014", - "015", "016", "017", "018", - "019", "020", "021", - "022", - "023", - "024" + "022" ] } diff --git a/parser/testdata/parse/postgres_regress/create_function_c.metadata.json b/parser/testdata/parse/postgres_regress/create_function_c.metadata.json index e8e06a4..90204d5 100644 --- a/parser/testdata/parse/postgres_regress/create_function_c.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_function_c.metadata.json @@ -3,7 +3,6 @@ "001", "002", "003", - "004", "005" ] } diff --git a/parser/testdata/parse/postgres_regress/create_function_sql.metadata.json b/parser/testdata/parse/postgres_regress/create_function_sql.metadata.json index 643249b..e8a330d 100644 --- a/parser/testdata/parse/postgres_regress/create_function_sql.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_function_sql.metadata.json @@ -7,34 +7,23 @@ "005", "006", "007", - "008", - "009", - "010", - "011", "012", "013", "014", "015", - "016", "017", "018", - "019", "020", "021", "022", - "023", "024", "025", "026", - "027", "028", "029", - "030", "031", "032", - "033", "034", - "035", "036", "037", "038", @@ -47,25 +36,17 @@ "045", "046", "047", - "048", "049", "050", "051", - "052", - "053", - "054", - "055", - "056", "057", "058", "059", "060", - "061", "062", "063", "064", "065", - "066", "067", "068", "069", @@ -75,30 +56,15 @@ "073", "074", "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", "089", "090", "091", "092", "093", - "094", "095", "096", "097", "098", - "099", "100", "101", "102", @@ -107,10 +73,6 @@ "105", "106", "107", - "108", - "109", - "110", - "111", "112", "113", "114", @@ -125,28 +87,19 @@ "123", "124", "125", - "126", "127", "128", "129", - "130", "131", "132", "133", - "134", "135", - "136", "137", "138", "139", - "140", "141", - "142", - "143", "144", - "145", "146", - "147", "148", "149", "150", diff --git a/parser/testdata/parse/postgres_regress/create_index.metadata.json b/parser/testdata/parse/postgres_regress/create_index.metadata.json index 528c575..9042fed 100644 --- a/parser/testdata/parse/postgres_regress/create_index.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_index.metadata.json @@ -41,133 +41,55 @@ "039", "040", "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", "062", "063", "064", "065", - "066", "067", - "068", "069", - "070", "071", - "072", "073", - "074", "075", - "076", "077", - "078", "079", - "080", "081", - "082", "083", - "084", "085", - "086", "087", - "088", "089", - "090", "091", - "092", "093", - "094", "095", - "096", "097", - "098", "099", - "100", "101", - "102", "103", - "104", "105", - "106", "107", "108", "109", "110", - "111", "112", "113", "114", "115", "116", "117", - "118", - "119", - "120", - "121", "122", "123", "124", "125", "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", "139", "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", "153", "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", "162", "163", "164", "165", "166", "167", - "168", "169", "170", "171", @@ -176,7 +98,6 @@ "174", "175", "176", - "177", "178", "179", "180", @@ -195,8 +116,6 @@ "193", "194", "195", - "196", - "197", "198", "199", "200", @@ -308,87 +227,40 @@ "306", "307", "308", - "309", - "310", - "311", - "312", - "313", - "314", "315", "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", "324", "325", - "326", - "327", - "328", - "329", - "330", - "331", "332", "333", - "334", - "335", - "336", - "337", - "338", - "339", "340", "341", "342", "343", "344", - "345", - "346", - "347", - "348", - "349", - "350", "351", "352", "353", "354", "355", - "356", "357", - "358", "359", "360", "361", "362", - "363", "364", - "365", "366", - "367", "368", - "369", "370", - "371", "372", - "373", "374", - "375", "376", - "377", "378", - "379", "380", - "381", "382", - "383", "384", - "385", "386", - "387", "388", - "389", "390", "391", "392", @@ -418,32 +290,24 @@ "416", "417", "418", - "419", "420", "421", "422", - "423", "424", "425", "426", - "427", "428", - "429", "430", - "431", "432", "433", "434", "435", "436", - "437", "438", "439", "440", "441", - "442", "443", - "444", "445", "446", "447", @@ -464,16 +328,10 @@ "462", "463", "464", - "465", - "466", - "467", "468", "469", - "470", "471", "472", - "473", - "474", "475", "476", "477", @@ -483,13 +341,9 @@ "481", "482", "483", - "484", "485", - "486", "487", - "488", "489", - "490", "491", "492", "493", @@ -498,13 +352,9 @@ "496", "497", "498", - "499", "500", - "501", "502", - "503", "504", - "505", "506", "507", "508", @@ -539,20 +389,8 @@ "537", "538", "539", - "540", - "541", - "542", - "543", "544", - "545", - "546", - "547", "548", - "549", - "550", - "551", - "552", - "553", "554", "555", "556", @@ -573,9 +411,7 @@ "571", "572", "573", - "574", "575", - "576", "577", "578", "579", @@ -593,7 +429,6 @@ "591", "592", "593", - "594", "595", "596", "597", diff --git a/parser/testdata/parse/postgres_regress/create_index_spgist.metadata.json b/parser/testdata/parse/postgres_regress/create_index_spgist.metadata.json index 18fb3ca..0463040 100644 --- a/parser/testdata/parse/postgres_regress/create_index_spgist.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_index_spgist.metadata.json @@ -14,191 +14,95 @@ "012", "013", "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", "025", "026", "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", "042", "043", "044", "045", - "046", "047", - "048", "049", - "050", "051", - "052", "053", - "054", "055", - "056", "057", - "058", "059", - "060", "061", - "062", "063", - "064", "065", "066", - "067", "068", "069", - "070", "071", "072", - "073", "074", - "075", "076", - "077", "078", - "079", "080", - "081", "082", - "083", "084", - "085", "086", - "087", "088", "089", - "090", "091", "092", - "093", "094", "095", - "096", "097", "098", "099", - "100", "101", - "102", "103", - "104", "105", - "106", "107", - "108", "109", - "110", "111", - "112", "113", - "114", "115", - "116", "117", - "118", "119", - "120", "121", - "122", "123", - "124", "125", - "126", "127", - "128", "129", - "130", "131", - "132", "133", "134", "135", "136", - "137", "138", - "139", "140", - "141", "142", - "143", "144", - "145", "146", - "147", "148", - "149", "150", - "151", "152", - "153", "154", - "155", "156", - "157", "158", - "159", "160", - "161", "162", - "163", "164", - "165", "166", - "167", "168", - "169", "170", - "171", "172", - "173", "174", - "175", "176", - "177", "178", - "179", "180", - "181", "182", - "183", "184", - "185", "186", - "187", "188", - "189", "190", - "191", "192", - "193", "194", - "195", "196", - "197", "198", - "199", "200", "201", "202" diff --git a/parser/testdata/parse/postgres_regress/create_misc.metadata.json b/parser/testdata/parse/postgres_regress/create_misc.metadata.json index aa15346..04cb06b 100644 --- a/parser/testdata/parse/postgres_regress/create_misc.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_misc.metadata.json @@ -62,31 +62,17 @@ "060", "061", "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", "071", "072", "073", "074", "075", "076", - "077", "078", - "079", "080", - "081", "082", "083", "084", - "085", - "086", - "087", - "088" + "086" ] } diff --git a/parser/testdata/parse/postgres_regress/create_operator.metadata.json b/parser/testdata/parse/postgres_regress/create_operator.metadata.json index 44e163a..4cc5552 100644 --- a/parser/testdata/parse/postgres_regress/create_operator.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_operator.metadata.json @@ -3,7 +3,6 @@ "001", "002", "003", - "004", "005", "006", "007", @@ -12,17 +11,7 @@ "010", "011", "012", - "013", - "014", - "015", - "016", "017", - "018", - "019", - "020", - "021", - "022", - "023", "024", "025", "026", diff --git a/parser/testdata/parse/postgres_regress/create_procedure.metadata.json b/parser/testdata/parse/postgres_regress/create_procedure.metadata.json index c169184..3d81b6a 100644 --- a/parser/testdata/parse/postgres_regress/create_procedure.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_procedure.metadata.json @@ -5,17 +5,12 @@ "003", "004", "005", - "006", - "007", "008", "009", "010", - "011", "012", "013", - "014", "015", - "016", "017", "018", "019", @@ -23,7 +18,6 @@ "021", "022", "023", - "024", "025", "026", "027", @@ -36,7 +30,6 @@ "034", "035", "036", - "037", "038", "039", "040", @@ -51,7 +44,6 @@ "049", "050", "051", - "052", "053", "054", "055", diff --git a/parser/testdata/parse/postgres_regress/create_table.metadata.json b/parser/testdata/parse/postgres_regress/create_table.metadata.json index f382372..d12570c 100644 --- a/parser/testdata/parse/postgres_regress/create_table.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_table.metadata.json @@ -5,10 +5,8 @@ "003", "004", "005", - "006", "007", "008", - "009", "010", "011", "012", @@ -25,12 +23,9 @@ "023", "024", "025", - "026", "027", "028", "029", - "030", - "031", "032", "033", "034", @@ -39,7 +34,6 @@ "037", "038", "039", - "040", "041", "042", "043", @@ -90,7 +84,6 @@ "088", "089", "090", - "091", "092", "093", "094", @@ -112,13 +105,11 @@ "110", "111", "112", - "113", "114", "115", "116", "117", "118", - "119", "120", "121", "122", @@ -227,16 +218,12 @@ "225", "226", "227", - "228", "229", "230", - "231", "232", - "233", "234", "235", "236", - "237", "238", "239", "240", @@ -278,7 +265,6 @@ "276", "277", "278", - "279", "280", "281", "282", @@ -305,7 +291,6 @@ "303", "304", "305", - "306", "307", "308", "309", diff --git a/parser/testdata/parse/postgres_regress/create_table_like.metadata.json b/parser/testdata/parse/postgres_regress/create_table_like.metadata.json index 267f283..3598d51 100644 --- a/parser/testdata/parse/postgres_regress/create_table_like.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_table_like.metadata.json @@ -6,14 +6,9 @@ "004", "005", "006", - "007", - "008", - "009", - "010", "011", "012", "013", - "014", "015", "016", "017", @@ -23,27 +18,20 @@ "021", "022", "023", - "024", "025", "026", "027", - "028", "029", "030", - "031", "032", "033", - "034", "035", "036", "037", - "038", "039", "040", - "041", "042", "043", - "044", "045", "046", "047", @@ -51,13 +39,9 @@ "049", "050", "051", - "052", "053", - "054", "055", - "056", "057", - "058", "059", "060", "061", @@ -111,13 +95,9 @@ "109", "110", "111", - "112", "113", "114", - "115", "116", - "117", - "118", "119", "120", "121", diff --git a/parser/testdata/parse/postgres_regress/create_type.metadata.json b/parser/testdata/parse/postgres_regress/create_type.metadata.json index b064cb7..ce432c1 100644 --- a/parser/testdata/parse/postgres_regress/create_type.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_type.metadata.json @@ -21,7 +21,6 @@ "019", "020", "021", - "022", "023", "024", "025", @@ -29,7 +28,6 @@ "027", "028", "029", - "030", "031", "032", "033", @@ -49,24 +47,11 @@ "047", "048", "049", - "050", "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", "062", "063", - "064", "065", "066", - "067", "068", "069", "070", @@ -78,10 +63,6 @@ "076", "077", "078", - "079", - "080", - "081", - "082", "083", "084", "085" diff --git a/parser/testdata/parse/postgres_regress/create_view.metadata.json b/parser/testdata/parse/postgres_regress/create_view.metadata.json index 5d2a46c..fc77ce9 100644 --- a/parser/testdata/parse/postgres_regress/create_view.metadata.json +++ b/parser/testdata/parse/postgres_regress/create_view.metadata.json @@ -4,7 +4,6 @@ "002", "003", "004", - "005", "006", "007", "008", @@ -19,9 +18,7 @@ "017", "018", "019", - "020", "021", - "022", "023", "024", "025", @@ -58,8 +55,6 @@ "056", "057", "058", - "059", - "060", "061", "062", "063", @@ -73,17 +68,13 @@ "071", "072", "073", - "074", - "075", "076", "077", "078", "079", "080", "081", - "082", "083", - "084", "085", "086", "087", @@ -94,7 +85,6 @@ "092", "093", "094", - "095", "096", "097", "098", @@ -102,12 +92,8 @@ "100", "101", "102", - "103", "104", - "105", "106", - "107", - "108", "109", "110", "111", @@ -133,10 +119,6 @@ "131", "132", "133", - "134", - "135", - "136", - "137", "138", "139", "140", @@ -145,165 +127,86 @@ "143", "144", "145", - "146", - "147", - "148", - "149", - "150", "151", "152", - "153", - "154", - "155", - "156", - "157", "158", - "159", - "160", - "161", - "162", - "163", "164", "165", - "166", - "167", - "168", - "169", - "170", "171", - "172", - "173", - "174", - "175", - "176", "177", "178", "179", - "180", "181", - "182", "183", - "184", "185", - "186", "187", "188", - "189", - "190", "191", "192", "193", "194", - "195", "196", - "197", "198", - "199", "200", "201", "202", "203", - "204", - "205", - "206", "207", "208", "209", "210", - "211", "212", "213", "214", - "215", "216", - "217", "218", "219", "220", "221", - "222", "223", - "224", "225", "226", "227", "228", "229", - "230", - "231", "232", "233", "234", "235", - "236", "237", - "238", - "239", "240", "241", "242", "243", "244", - "245", - "246", - "247", "248", "249", "250", - "251", - "252", "253", - "254", "255", - "256", "257", "258", - "259", - "260", - "261", "262", - "263", - "264", - "265", "266", - "267", - "268", - "269", "270", "271", "272", - "273", "274", - "275", - "276", - "277", "278", - "279", "280", - "281", "282", - "283", "284", - "285", "286", - "287", "288", - "289", - "290", "291", - "292", "293", - "294", "295", "296", "297", - "298", "299", "300", "301", - "302", "303", - "304", "305", "306", "307" diff --git a/parser/testdata/parse/postgres_regress/date.metadata.json b/parser/testdata/parse/postgres_regress/date.metadata.json index a6ce2f7..1b50005 100644 --- a/parser/testdata/parse/postgres_regress/date.metadata.json +++ b/parser/testdata/parse/postgres_regress/date.metadata.json @@ -18,257 +18,10 @@ "016", "017", "018", - "019", - "020", - "021", "022", "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270" + "167" ] } diff --git a/parser/testdata/parse/postgres_regress/dbsize.metadata.json b/parser/testdata/parse/postgres_regress/dbsize.metadata.json index 253273e..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/dbsize.metadata.json +++ b/parser/testdata/parse/postgres_regress/dbsize.metadata.json @@ -1,29 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/delete.metadata.json b/parser/testdata/parse/postgres_regress/delete.metadata.json index 92b8f9e..3cf0226 100644 --- a/parser/testdata/parse/postgres_regress/delete.metadata.json +++ b/parser/testdata/parse/postgres_regress/delete.metadata.json @@ -6,9 +6,7 @@ "004", "005", "006", - "007", "008", - "009", "010" ] } diff --git a/parser/testdata/parse/postgres_regress/dependency.metadata.json b/parser/testdata/parse/postgres_regress/dependency.metadata.json index 7d59f7e..cfdb638 100644 --- a/parser/testdata/parse/postgres_regress/dependency.metadata.json +++ b/parser/testdata/parse/postgres_regress/dependency.metadata.json @@ -51,10 +51,8 @@ "049", "050", "051", - "052", "053", "054", - "055", "056", "057", "058", diff --git a/parser/testdata/parse/postgres_regress/domain.metadata.json b/parser/testdata/parse/postgres_regress/domain.metadata.json index 60d70f4..cefcd81 100644 --- a/parser/testdata/parse/postgres_regress/domain.metadata.json +++ b/parser/testdata/parse/postgres_regress/domain.metadata.json @@ -10,18 +10,11 @@ "008", "009", "010", - "011", - "012", "013", "014", "015", "016", "017", - "018", - "019", - "020", - "021", - "022", "023", "024", "025", @@ -29,14 +22,6 @@ "027", "028", "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", "038", "039", "040", @@ -49,19 +34,9 @@ "047", "048", "049", - "050", - "051", - "052", "053", "054", - "055", "056", - "057", - "058", - "059", - "060", - "061", - "062", "063", "064", "065", @@ -82,7 +57,6 @@ "080", "081", "082", - "083", "084", "085", "086", @@ -98,19 +72,15 @@ "096", "097", "098", - "099", "100", "101", "102", "103", "104", - "105", "106", "107", - "108", "109", "110", - "111", "112", "113", "114", @@ -135,9 +105,7 @@ "133", "134", "135", - "136", "137", - "138", "139", "140", "141", @@ -156,15 +124,10 @@ "154", "155", "156", - "157", "158", - "159", "160", - "161", "162", - "163", "164", - "165", "166", "167", "168", @@ -174,12 +137,6 @@ "172", "173", "174", - "175", - "176", - "177", - "178", - "179", - "180", "181", "182", "183", @@ -202,15 +159,8 @@ "200", "201", "202", - "203", "204", - "205", "206", - "207", - "208", - "209", - "210", - "211", "212", "213", "214", @@ -251,49 +201,30 @@ "249", "250", "251", - "252", - "253", "254", "255", - "256", - "257", "258", "259", - "260", - "261", "262", "263", - "264", - "265", "266", "267", "268", "269", "270", - "271", "272", - "273", - "274", "275", "276", "277", - "278", "279", - "280", "281", - "282", "283", - "284", "285", - "286", "287", - "288", "289", "290", "291", "292", - "293", - "294", "295", "296", "297", @@ -311,13 +242,6 @@ "309", "310", "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319" + "315" ] } diff --git a/parser/testdata/parse/postgres_regress/drop_operator.metadata.json b/parser/testdata/parse/postgres_regress/drop_operator.metadata.json index bf73c3a..b932793 100644 --- a/parser/testdata/parse/postgres_regress/drop_operator.metadata.json +++ b/parser/testdata/parse/postgres_regress/drop_operator.metadata.json @@ -3,14 +3,10 @@ "001", "002", "003", - "004", - "005", "006", "007", "008", "009", - "010", - "011", "012" ] } diff --git a/parser/testdata/parse/postgres_regress/enum.metadata.json b/parser/testdata/parse/postgres_regress/enum.metadata.json index 6f770d9..dd0ff69 100644 --- a/parser/testdata/parse/postgres_regress/enum.metadata.json +++ b/parser/testdata/parse/postgres_regress/enum.metadata.json @@ -1,30 +1,17 @@ { "todo": [ "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", "009", - "010", "011", - "012", "013", "014", "015", "016", - "017", - "018", "019", "020", "021", "022", - "023", "024", - "025", "026", "027", "028", @@ -56,64 +43,22 @@ "054", "055", "056", - "057", "058", "059", "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", "073", "074", "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", "085", "086", - "087", "088", "089", "090", "091", - "092", - "093", - "094", "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", "109", - "110", "111", - "112", "113", - "114", "115", "116", "117", @@ -125,50 +70,37 @@ "123", "124", "125", - "126", "127", "128", "129", "130", "131", "132", - "133", "134", - "135", - "136", "137", - "138", "139", "140", - "141", - "142", "143", "144", "145", - "146", "147", "148", "149", - "150", "151", "152", "153", "154", "155", - "156", "157", "158", "159", "160", "161", "162", - "163", "164", "165", "166", "167", - "168", - "169", - "170" + "168" ] } diff --git a/parser/testdata/parse/postgres_regress/errors.metadata.json b/parser/testdata/parse/postgres_regress/errors.metadata.json index b064cb7..e5e1304 100644 --- a/parser/testdata/parse/postgres_regress/errors.metadata.json +++ b/parser/testdata/parse/postgres_regress/errors.metadata.json @@ -1,15 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", "011", "012", "013", @@ -61,17 +51,6 @@ "059", "060", "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", "073", "074", "075", diff --git a/parser/testdata/parse/postgres_regress/event_trigger.metadata.json b/parser/testdata/parse/postgres_regress/event_trigger.metadata.json index 21e7df0..76a5b30 100644 --- a/parser/testdata/parse/postgres_regress/event_trigger.metadata.json +++ b/parser/testdata/parse/postgres_regress/event_trigger.metadata.json @@ -2,7 +2,6 @@ "todo": [ "001", "002", - "003", "004", "005", "006", @@ -35,7 +34,6 @@ "033", "034", "035", - "036", "037", "038", "039", @@ -88,9 +86,7 @@ "086", "087", "088", - "089", "090", - "091", "092", "093", "094", @@ -127,7 +123,6 @@ "125", "126", "127", - "128", "129", "130", "131", @@ -218,7 +213,6 @@ "216", "217", "218", - "219", "220", "221", "222", diff --git a/parser/testdata/parse/postgres_regress/event_trigger_login.metadata.json b/parser/testdata/parse/postgres_regress/event_trigger_login.metadata.json index 4739b17..8b00fe0 100644 --- a/parser/testdata/parse/postgres_regress/event_trigger_login.metadata.json +++ b/parser/testdata/parse/postgres_regress/event_trigger_login.metadata.json @@ -5,9 +5,6 @@ "003", "004", "005", - "006", - "007", - "008", "009", "010", "011" diff --git a/parser/testdata/parse/postgres_regress/explain.metadata.json b/parser/testdata/parse/postgres_regress/explain.metadata.json index fbb3e40..fd945f7 100644 --- a/parser/testdata/parse/postgres_regress/explain.metadata.json +++ b/parser/testdata/parse/postgres_regress/explain.metadata.json @@ -4,52 +4,26 @@ "002", "003", "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", "013", - "014", "015", "016", "017", - "018", - "019", "020", - "021", - "022", - "023", - "024", - "025", - "026", "027", - "028", "029", "030", "031", "032", "033", - "034", "035", "036", "037", "038", "039", "040", - "041", "042", "043", "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051" + "046" ] } diff --git a/parser/testdata/parse/postgres_regress/expressions.metadata.json b/parser/testdata/parse/postgres_regress/expressions.metadata.json index fb72ee9..0d7d4b7 100644 --- a/parser/testdata/parse/postgres_regress/expressions.metadata.json +++ b/parser/testdata/parse/postgres_regress/expressions.metadata.json @@ -1,23 +1,7 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", "015", - "016", "017", - "018", "019", "020", "021", @@ -29,25 +13,9 @@ "027", "028", "029", - "030", "031", "032", "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", "049", "050", "051", @@ -64,12 +32,6 @@ "062", "063", "064", - "065", - "066", - "067", - "068", - "069", - "070", "071" ] } diff --git a/parser/testdata/parse/postgres_regress/fast_default.metadata.json b/parser/testdata/parse/postgres_regress/fast_default.metadata.json index 354a8d0..fd73f1f 100644 --- a/parser/testdata/parse/postgres_regress/fast_default.metadata.json +++ b/parser/testdata/parse/postgres_regress/fast_default.metadata.json @@ -14,7 +14,6 @@ "012", "013", "014", - "015", "016", "017", "018", @@ -42,12 +41,9 @@ "040", "041", "042", - "043", - "044", "045", "046", "047", - "048", "049", "050", "051", @@ -63,8 +59,6 @@ "061", "062", "063", - "064", - "065", "066", "067", "068", @@ -73,13 +67,9 @@ "071", "072", "073", - "074", "075", "076", - "077", "078", - "079", - "080", "081", "082", "083", @@ -88,41 +78,27 @@ "086", "087", "088", - "089", "090", - "091", "092", - "093", "094", "095", - "096", "097", "098", "099", - "100", "101", "102", "103", "104", "105", - "106", "107", - "108", "109", - "110", - "111", - "112", "113", - "114", "115", "116", "117", "118", - "119", - "120", "121", "122", - "123", "124", "125", "126", @@ -130,13 +106,9 @@ "128", "129", "130", - "131", "132", - "133", - "134", "135", "136", - "137", "138", "139", "140", @@ -144,72 +116,56 @@ "142", "143", "144", - "145", "146", - "147", "148", "149", "150", "151", "152", "153", - "154", "155", - "156", "157", "158", "159", "160", "161", "162", - "163", "164", - "165", "166", "167", "168", "169", "170", "171", - "172", "173", - "174", "175", "176", "177", "178", "179", "180", - "181", "182", - "183", "184", "185", "186", "187", "188", "189", - "190", "191", - "192", "193", "194", "195", "196", "197", "198", - "199", "200", - "201", "202", "203", "204", "205", "206", "207", - "208", "209", - "210", "211", "212", "213", @@ -221,16 +177,13 @@ "219", "220", "221", - "222", "223", - "224", "225", "226", "227", "228", "229", "230", - "231", "232", "233", "234", @@ -238,16 +191,13 @@ "236", "237", "238", - "239", "240", - "241", "242", "243", "244", "245", "246", "247", - "248", "249", "250", "251", @@ -267,7 +217,6 @@ "265", "266", "267", - "268", - "269" + "268" ] } diff --git a/parser/testdata/parse/postgres_regress/float4.metadata.json b/parser/testdata/parse/postgres_regress/float4.metadata.json index a864d8e..7c488b7 100644 --- a/parser/testdata/parse/postgres_regress/float4.metadata.json +++ b/parser/testdata/parse/postgres_regress/float4.metadata.json @@ -26,69 +26,7 @@ "024", "025", "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", "090", "091", "092", @@ -97,8 +35,6 @@ "095", "096", "097", - "098", - "099", "100" ] } diff --git a/parser/testdata/parse/postgres_regress/float8.metadata.json b/parser/testdata/parse/postgres_regress/float8.metadata.json index 194b55b..04c38b2 100644 --- a/parser/testdata/parse/postgres_regress/float8.metadata.json +++ b/parser/testdata/parse/postgres_regress/float8.metadata.json @@ -6,11 +6,6 @@ "004", "005", "006", - "007", - "008", - "009", - "010", - "011", "012", "013", "014", @@ -19,145 +14,15 @@ "017", "018", "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", "132", - "133", "134", "135", "136", "137", "138", "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", "159", "160", "161", @@ -166,8 +31,6 @@ "164", "165", "166", - "167", - "168", "169" ] } diff --git a/parser/testdata/parse/postgres_regress/foreign_data.metadata.json b/parser/testdata/parse/postgres_regress/foreign_data.metadata.json index efde331..b57efe1 100644 --- a/parser/testdata/parse/postgres_regress/foreign_data.metadata.json +++ b/parser/testdata/parse/postgres_regress/foreign_data.metadata.json @@ -14,9 +14,6 @@ "012", "013", "014", - "015", - "016", - "017", "018", "019", "020", @@ -210,7 +207,6 @@ "208", "209", "210", - "211", "212", "213", "214", @@ -313,40 +309,12 @@ "311", "312", "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", "324", - "325", - "326", - "327", "328", "329", - "330", "331", - "332", - "333", - "334", - "335", - "336", - "337", "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", "346", - "347", "348", "349", "350", @@ -455,7 +423,6 @@ "453", "454", "455", - "456", "457", "458", "459", @@ -526,9 +493,6 @@ "524", "525", "526", - "527", - "528", - "529", - "530" + "527" ] } diff --git a/parser/testdata/parse/postgres_regress/foreign_key.metadata.json b/parser/testdata/parse/postgres_regress/foreign_key.metadata.json index 0d39ce9..9ee373a 100644 --- a/parser/testdata/parse/postgres_regress/foreign_key.metadata.json +++ b/parser/testdata/parse/postgres_regress/foreign_key.metadata.json @@ -12,11 +12,8 @@ "010", "011", "012", - "013", "014", - "015", "016", - "017", "018", "019", "020", @@ -39,19 +36,13 @@ "037", "038", "039", - "040", "041", - "042", "043", - "044", "045", - "046", "047", "048", "049", "050", - "051", - "052", "053", "054", "055", @@ -72,13 +63,9 @@ "070", "071", "072", - "073", "074", - "075", "076", - "077", "078", - "079", "080", "081", "082", @@ -94,17 +81,13 @@ "092", "093", "094", - "095", - "096", "097", "098", - "099", "100", "1000", "1001", "1002", "1003", - "1004", "1005", "1006", "1007", @@ -118,10 +101,8 @@ "1014", "1015", "1016", - "1017", "1018", "1019", - "102", "1020", "1021", "1022", @@ -138,8 +119,6 @@ "1032", "1033", "1034", - "1035", - "1036", "1037", "1038", "1039", @@ -195,24 +174,16 @@ "1084", "1085", "1086", - "1087", - "1088", - "1089", "109", "1090", "1091", "1092", "1093", "1094", - "1095", - "1096", - "1097", - "1098", "1099", "110", "1100", "1101", - "1102", "1103", "1104", "1105", @@ -265,8 +236,6 @@ "1148", "1149", "115", - "1150", - "1151", "1152", "1153", "1154", @@ -278,13 +247,10 @@ "121", "122", "123", - "124", "125", "126", "127", "128", - "129", - "130", "131", "132", "133", @@ -294,8 +260,6 @@ "137", "138", "139", - "140", - "141", "142", "143", "144", @@ -310,17 +274,10 @@ "153", "154", "155", - "156", "157", "158", - "159", - "160", "161", - "162", - "163", "164", - "165", - "166", "167", "168", "169", @@ -336,17 +293,10 @@ "179", "180", "181", - "182", "183", "184", - "185", - "186", "187", - "188", - "189", "190", - "191", - "192", "193", "194", "195", @@ -364,19 +314,12 @@ "207", "208", "209", - "210", "211", "212", "213", "214", - "215", - "216", "217", - "218", - "219", "220", - "221", - "222", "223", "224", "225", @@ -384,11 +327,9 @@ "227", "228", "229", - "230", "231", "232", "233", - "234", "235", "236", "237", @@ -590,36 +531,26 @@ "433", "434", "435", - "436", "437", - "438", "439", - "440", "441", "442", - "443", "444", - "445", "446", "447", "448", "449", "450", - "451", "452", - "453", "454", "455", "456", "457", "458", - "459", "460", - "461", "462", "463", "464", - "465", "466", "467", "468", @@ -655,7 +586,6 @@ "498", "499", "500", - "501", "502", "503", "504", @@ -685,11 +615,7 @@ "528", "529", "530", - "531", - "532", "533", - "534", - "535", "536", "537", "538", @@ -760,13 +686,9 @@ "603", "604", "605", - "606", "607", - "608", "609", - "610", "611", - "612", "613", "614", "615", @@ -774,12 +696,10 @@ "617", "618", "619", - "620", "621", "622", "623", "624", - "625", "626", "627", "628", @@ -789,15 +709,11 @@ "632", "633", "634", - "635", "636", "637", "638", "639", - "640", - "641", "642", - "643", "644", "645", "646", @@ -869,7 +785,6 @@ "712", "713", "714", - "715", "716", "717", "718", @@ -882,7 +797,6 @@ "725", "726", "727", - "728", "729", "730", "731", @@ -1031,7 +945,6 @@ "874", "875", "876", - "877", "878", "879", "880", @@ -1130,9 +1043,7 @@ "973", "974", "975", - "976", "977", - "978", "979", "980", "981", @@ -1145,7 +1056,6 @@ "988", "989", "990", - "991", "992", "993", "994", diff --git a/parser/testdata/parse/postgres_regress/functional_deps.metadata.json b/parser/testdata/parse/postgres_regress/functional_deps.metadata.json index 32e0be1..4e897cd 100644 --- a/parser/testdata/parse/postgres_regress/functional_deps.metadata.json +++ b/parser/testdata/parse/postgres_regress/functional_deps.metadata.json @@ -2,26 +2,11 @@ "todo": [ "001", "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", "013", "014", - "015", - "016", "017", - "018", "019", "020", - "021", - "022", "023", "024", "025", diff --git a/parser/testdata/parse/postgres_regress/generated.metadata.json b/parser/testdata/parse/postgres_regress/generated.metadata.json index b6ecb7b..5b4c7ae 100644 --- a/parser/testdata/parse/postgres_regress/generated.metadata.json +++ b/parser/testdata/parse/postgres_regress/generated.metadata.json @@ -1,10 +1,7 @@ { "todo": [ - "001", "002", "003", - "004", - "005", "006", "007", "008", @@ -28,32 +25,21 @@ "026", "027", "028", - "029", "030", "031", "032", - "033", - "034", - "035", "036", - "037", "038", "039", "040", - "041", "042", - "043", "044", - "045", "046", - "047", "048", "049", "050", - "051", "052", "053", - "054", "055", "056", "057", @@ -63,15 +49,10 @@ "061", "062", "063", - "064", "065", "066", - "067", "068", - "069", "070", - "071", - "072", "073", "074", "075", @@ -98,20 +79,14 @@ "096", "097", "098", - "099", "100", - "101", "102", "103", "104", - "105", "106", - "107", "108", "109", - "110", "111", - "112", "113", "114", "115", diff --git a/parser/testdata/parse/postgres_regress/geometry.metadata.json b/parser/testdata/parse/postgres_regress/geometry.metadata.json index 4e31a92..8ab1b78 100644 --- a/parser/testdata/parse/postgres_regress/geometry.metadata.json +++ b/parser/testdata/parse/postgres_regress/geometry.metadata.json @@ -1,166 +1,9 @@ { "todo": [ "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", "151", - "152", "153", - "154", "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162" + "157" ] } diff --git a/parser/testdata/parse/postgres_regress/gin.metadata.json b/parser/testdata/parse/postgres_regress/gin.metadata.json index f53b7f4..de868eb 100644 --- a/parser/testdata/parse/postgres_regress/gin.metadata.json +++ b/parser/testdata/parse/postgres_regress/gin.metadata.json @@ -4,10 +4,8 @@ "002", "003", "004", - "005", "006", "007", - "008", "009", "010", "011", @@ -16,42 +14,29 @@ "014", "015", "016", - "017", "018", "019", - "020", "021", "022", "023", "024", "025", "026", - "027", - "028", "029", - "030", "031", "032", "033", - "034", "035", "036", "037", - "038", "039", "040", "041", "042", - "043", "044", - "045", "046", - "047", "048", "049", - "050", - "051", - "052", "053", "054", "055", diff --git a/parser/testdata/parse/postgres_regress/gist.metadata.json b/parser/testdata/parse/postgres_regress/gist.metadata.json index 7d59f7e..295d0e8 100644 --- a/parser/testdata/parse/postgres_regress/gist.metadata.json +++ b/parser/testdata/parse/postgres_regress/gist.metadata.json @@ -24,35 +24,23 @@ "022", "023", "024", - "025", "026", - "027", "028", - "029", "030", - "031", "032", "033", "034", - "035", "036", - "037", "038", - "039", "040", "041", "042", - "043", "044", "045", "046", - "047", "048", - "049", "050", - "051", "052", - "053", "054", "055", "056", diff --git a/parser/testdata/parse/postgres_regress/groupingsets.metadata.json b/parser/testdata/parse/postgres_regress/groupingsets.metadata.json index 643d115..dc65c1e 100644 --- a/parser/testdata/parse/postgres_regress/groupingsets.metadata.json +++ b/parser/testdata/parse/postgres_regress/groupingsets.metadata.json @@ -11,122 +11,36 @@ "009", "010", "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", "037", - "038", - "039", - "040", - "041", - "042", "043", - "044", "045", - "046", "047", - "048", - "049", - "050", "051", "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", "065", - "066", - "067", - "068", - "069", - "070", "071", - "072", "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", "084", - "085", - "086", - "087", "088", - "089", "090", "091", - "092", - "093", "094", - "095", "096", - "097", "098", - "099", - "100", "101", - "102", "103", - "104", "105", - "106", "107", - "108", "109", - "110", "111", - "112", "113", - "114", "115", "116", "117", "118", - "119", "120", "121", - "122", "123", - "124", - "125", - "126", - "127", "128", "129", "130", @@ -134,8 +48,6 @@ "132", "133", "134", - "135", - "136", "137", "138", "139", @@ -143,7 +55,6 @@ "141", "142", "143", - "144", "145", "146", "147", @@ -161,16 +72,9 @@ "159", "160", "161", - "162", "163", "164", - "165", - "166", - "167", - "168", "169", - "170", - "171", - "172" + "171" ] } diff --git a/parser/testdata/parse/postgres_regress/guc.metadata.json b/parser/testdata/parse/postgres_regress/guc.metadata.json index 8f8fab6..4bd108b 100644 --- a/parser/testdata/parse/postgres_regress/guc.metadata.json +++ b/parser/testdata/parse/postgres_regress/guc.metadata.json @@ -5,105 +5,83 @@ "003", "004", "005", - "006", "007", "008", "009", "010", - "011", "012", "013", "014", "015", "016", - "017", "018", "019", "020", - "021", "022", "023", "024", "025", "026", - "027", "028", "029", "030", - "031", "032", "033", "034", "035", - "036", "037", "038", "039", "040", "041", - "042", "043", "044", - "045", "046", "047", "048", "049", - "050", "051", "052", "053", "054", "055", - "056", "057", "058", "059", - "060", "061", "062", "063", - "064", "065", "066", "067", - "068", "069", "070", "071", - "072", "073", "074", "075", "076", "077", - "078", "079", "080", "081", - "082", "083", "084", "085", - "086", "087", "088", "089", - "090", "091", "092", "093", "094", "095", - "096", "097", "098", "099", - "100", "101", "102", "103", - "104", "105", "106", "107", @@ -111,17 +89,13 @@ "109", "110", "111", - "112", "113", "114", "115", - "116", "117", "118", - "119", "120", "121", - "122", "123", "124", "125", @@ -141,9 +115,7 @@ "139", "140", "141", - "142", "143", - "144", "145", "146", "147", @@ -151,68 +123,32 @@ "149", "150", "151", - "152", - "153", - "154", "155", - "156", - "157", "158", - "159", - "160", - "161", "162", - "163", - "164", "165", "166", - "167", "168", - "169", "170", - "171", "172", "173", "174", - "175", "176", - "177", "178", - "179", "180", - "181", "182", - "183", "184", "185", - "186", "187", "188", - "189", - "190", - "191", - "192", - "193", - "194", "195", - "196", - "197", - "198", "199", "200", "201", - "202", "203", "204", "205", - "206", - "207", "208", - "209", - "210", - "211", - "212", - "213", "214" ] } diff --git a/parser/testdata/parse/postgres_regress/hash_func.metadata.json b/parser/testdata/parse/postgres_regress/hash_func.metadata.json index e74143a..c1cac8f 100644 --- a/parser/testdata/parse/postgres_regress/hash_func.metadata.json +++ b/parser/testdata/parse/postgres_regress/hash_func.metadata.json @@ -1,47 +1,10 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", "026", - "027", "028", - "029", - "030", - "031", "032", - "033", "034", "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043" + "038" ] } diff --git a/parser/testdata/parse/postgres_regress/hash_index.metadata.json b/parser/testdata/parse/postgres_regress/hash_index.metadata.json index ba349a5..dae43f7 100644 --- a/parser/testdata/parse/postgres_regress/hash_index.metadata.json +++ b/parser/testdata/parse/postgres_regress/hash_index.metadata.json @@ -19,30 +19,14 @@ "017", "018", "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", "028", - "029", "030", - "031", "032", - "033", "034", - "035", "036", - "037", "038", - "039", "040", - "041", "042", - "043", "044", "045", "046", diff --git a/parser/testdata/parse/postgres_regress/hash_part.metadata.json b/parser/testdata/parse/postgres_regress/hash_part.metadata.json index d49a93c..f585d02 100644 --- a/parser/testdata/parse/postgres_regress/hash_part.metadata.json +++ b/parser/testdata/parse/postgres_regress/hash_part.metadata.json @@ -2,29 +2,10 @@ "todo": [ "001", "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", "017", - "018", - "019", - "020", - "021", "022", "023", "024", - "025", "026", "027", "028" diff --git a/parser/testdata/parse/postgres_regress/horology.metadata.json b/parser/testdata/parse/postgres_regress/horology.metadata.json index 820fe8a..afbebc5 100644 --- a/parser/testdata/parse/postgres_regress/horology.metadata.json +++ b/parser/testdata/parse/postgres_regress/horology.metadata.json @@ -2,391 +2,39 @@ "todo": [ "001", "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", "018", - "019", "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", "033", - "034", - "035", "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", "147", - "148", - "149", - "150", - "151", "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", "193", "194", - "195", - "196", - "197", - "198", - "199", - "200", "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", "209", - "210", - "211", - "212", - "213", - "214", "215", "216", - "217", "218", - "219", "220", - "221", "222", - "223", "224", "225", - "226", "227", - "228", "229", "230", - "231", "232", "233", "234", - "235", - "236", "237", "238", - "239", "240", "241", - "242", "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", - "376", - "377", "378", "379", "380", - "381", - "382", - "383", - "384", - "385", "386", - "387", "388" ] } diff --git a/parser/testdata/parse/postgres_regress/identity.metadata.json b/parser/testdata/parse/postgres_regress/identity.metadata.json index a6ce2f7..748d9f6 100644 --- a/parser/testdata/parse/postgres_regress/identity.metadata.json +++ b/parser/testdata/parse/postgres_regress/identity.metadata.json @@ -1,13 +1,9 @@ { "todo": [ - "001", "002", "003", "004", "005", - "006", - "007", - "008", "009", "010", "011", @@ -28,10 +24,6 @@ "026", "027", "028", - "029", - "030", - "031", - "032", "033", "034", "035", @@ -49,37 +41,28 @@ "047", "048", "049", - "050", "051", "052", "053", - "054", "055", "056", "057", - "058", "059", "060", "061", - "062", "063", "064", - "065", "066", "067", - "068", "069", "070", "071", - "072", "073", "074", "075", "076", "077", "078", - "079", - "080", "081", "082", "083", @@ -88,25 +71,19 @@ "086", "087", "088", - "089", - "090", "091", "092", - "093", "094", "095", - "096", "097", "098", "099", "100", "101", - "102", "103", "104", "105", "106", - "107", "108", "109", "110", @@ -121,23 +98,18 @@ "119", "120", "121", - "122", - "123", "124", "125", "126", "127", - "128", "129", "130", "131", "132", - "133", "134", "135", "136", "137", - "138", "139", "140", "141", @@ -146,7 +118,6 @@ "144", "145", "146", - "147", "148", "149", "150", @@ -159,7 +130,6 @@ "157", "158", "159", - "160", "161", "162", "163", @@ -177,11 +147,7 @@ "175", "176", "177", - "178", - "179", "180", - "181", - "182", "183", "184", "185", @@ -192,7 +158,6 @@ "190", "191", "192", - "193", "194", "195", "196", @@ -201,13 +166,10 @@ "199", "200", "201", - "202", "203", "204", "205", "206", - "207", - "208", "209", "210", "211", @@ -221,7 +183,6 @@ "219", "220", "221", - "222", "223", "224", "225", @@ -229,7 +190,6 @@ "227", "228", "229", - "230", "231", "232", "233", @@ -261,14 +221,11 @@ "259", "260", "261", - "262", - "263", "264", "265", "266", "267", "268", - "269", - "270" + "269" ] } diff --git a/parser/testdata/parse/postgres_regress/incremental_sort.metadata.json b/parser/testdata/parse/postgres_regress/incremental_sort.metadata.json index b6ecb7b..1d813fc 100644 --- a/parser/testdata/parse/postgres_regress/incremental_sort.metadata.json +++ b/parser/testdata/parse/postgres_regress/incremental_sort.metadata.json @@ -12,67 +12,42 @@ "010", "011", "012", - "013", "014", - "015", "016", - "017", "018", - "019", "020", - "021", "022", "023", "024", "025", - "026", - "027", - "028", - "029", "030", "031", "032", "033", - "034", "035", - "036", "037", "038", "039", "040", "041", "042", - "043", "044", - "045", - "046", - "047", "048", "049", "050", "051", - "052", "053", - "054", "055", - "056", "057", - "058", "059", - "060", "061", "062", "063", "064", - "065", "066", - "067", "068", - "069", "070", - "071", "072", - "073", "074", "075", "076", diff --git a/parser/testdata/parse/postgres_regress/index_including.metadata.json b/parser/testdata/parse/postgres_regress/index_including.metadata.json index e6f6795..fa7d701 100644 --- a/parser/testdata/parse/postgres_regress/index_including.metadata.json +++ b/parser/testdata/parse/postgres_regress/index_including.metadata.json @@ -4,13 +4,11 @@ "002", "003", "004", - "005", "006", "007", "008", "009", "010", - "011", "012", "013", "014", @@ -18,69 +16,48 @@ "016", "017", "018", - "019", "020", "021", "022", "023", - "024", "025", "026", "027", "028", - "029", - "030", "031", "032", "033", - "034", - "035", "036", "037", "038", "039", - "040", "041", "042", - "043", "044", "045", "046", - "047", - "048", "049", "050", "051", - "052", - "053", "054", "055", "056", "057", "058", - "059", - "060", "061", "062", "063", "064", "065", - "066", "067", - "068", "069", "070", "071", - "072", "073", - "074", "075", "076", - "077", "078", - "079", "080", - "081", "082", "083", "084", @@ -92,16 +69,11 @@ "090", "091", "092", - "093", "094", "095", - "096", "097", - "098", "099", - "100", "101", - "102", "103", "104", "105", @@ -132,7 +104,6 @@ "130", "131", "132", - "133", "134", "135" ] diff --git a/parser/testdata/parse/postgres_regress/index_including_gist.metadata.json b/parser/testdata/parse/postgres_regress/index_including_gist.metadata.json index 147070d..b4a37ad 100644 --- a/parser/testdata/parse/postgres_regress/index_including_gist.metadata.json +++ b/parser/testdata/parse/postgres_regress/index_including_gist.metadata.json @@ -3,8 +3,6 @@ "001", "002", "003", - "004", - "005", "006", "007", "008", @@ -12,8 +10,6 @@ "010", "011", "012", - "013", - "014", "015", "016", "017", @@ -21,16 +17,12 @@ "019", "020", "021", - "022", "023", "024", "025", "026", - "027", "028", - "029", "030", - "031", "032", "033", "034", diff --git a/parser/testdata/parse/postgres_regress/indexing.metadata.json b/parser/testdata/parse/postgres_regress/indexing.metadata.json index 44a2d56..8765d36 100644 --- a/parser/testdata/parse/postgres_regress/indexing.metadata.json +++ b/parser/testdata/parse/postgres_regress/indexing.metadata.json @@ -2,17 +2,13 @@ "todo": [ "001", "002", - "003", - "004", "005", "006", "007", "008", "009", - "010", "011", "012", - "013", "014", "015", "016", @@ -21,7 +17,6 @@ "019", "020", "021", - "022", "023", "024", "025", @@ -38,14 +33,12 @@ "036", "037", "038", - "039", "040", "041", "042", "043", "044", "045", - "046", "047", "048", "049", @@ -53,17 +46,14 @@ "051", "052", "053", - "054", "055", "056", - "057", "058", "059", "060", "061", "062", "063", - "064", "065", "066", "067", @@ -84,7 +74,6 @@ "082", "083", "084", - "085", "086", "087", "088", @@ -102,9 +91,7 @@ "100", "101", "102", - "103", "104", - "105", "106", "107", "108", @@ -113,25 +100,18 @@ "111", "112", "113", - "114", "115", - "116", "117", - "118", "119", - "120", "121", "122", "123", "124", "125", "126", - "127", "128", - "129", "130", "131", - "132", "133", "134", "135", @@ -141,16 +121,13 @@ "139", "140", "141", - "142", "143", "144", "145", "146", "147", "148", - "149", "150", - "151", "152", "153", "154", @@ -159,14 +136,11 @@ "157", "158", "159", - "160", "161", "162", "163", "164", - "165", "166", - "167", "168", "169", "170", @@ -182,7 +156,6 @@ "180", "181", "182", - "183", "184", "185", "186", @@ -195,7 +168,6 @@ "193", "194", "195", - "196", "197", "198", "199", @@ -206,7 +178,6 @@ "204", "205", "206", - "207", "208", "209", "210", @@ -228,7 +199,6 @@ "226", "227", "228", - "229", "230", "231", "232", @@ -239,7 +209,6 @@ "237", "238", "239", - "240", "241", "242", "243", @@ -252,7 +221,6 @@ "250", "251", "252", - "253", "254", "255", "256", @@ -264,7 +232,6 @@ "262", "263", "264", - "265", "266", "267", "268", @@ -274,7 +241,6 @@ "272", "273", "274", - "275", "276", "277", "278", @@ -284,7 +250,6 @@ "282", "283", "284", - "285", "286", "287", "288", @@ -353,7 +318,6 @@ "351", "352", "353", - "354", "355", "356", "357", @@ -365,20 +329,17 @@ "363", "364", "365", - "366", "367", "368", "369", "370", "371", "372", - "373", "374", "375", "376", "377", "378", - "379", "380", "381", "382", @@ -396,9 +357,7 @@ "394", "395", "396", - "397", "398", - "399", "400", "401", "402", @@ -415,7 +374,6 @@ "413", "414", "415", - "416", "417", "418", "419", @@ -438,7 +396,6 @@ "436", "437", "438", - "439", "440", "441", "442", @@ -532,7 +489,6 @@ "530", "531", "532", - "533", "534", "535", "536", @@ -542,7 +498,6 @@ "540", "541", "542", - "543", "544", "545", "546", @@ -552,13 +507,10 @@ "550", "551", "552", - "553", "554", - "555", "556", "557", "558", - "559", "560" ] } diff --git a/parser/testdata/parse/postgres_regress/indirect_toast.metadata.json b/parser/testdata/parse/postgres_regress/indirect_toast.metadata.json index d49a93c..2041982 100644 --- a/parser/testdata/parse/postgres_regress/indirect_toast.metadata.json +++ b/parser/testdata/parse/postgres_regress/indirect_toast.metadata.json @@ -7,14 +7,11 @@ "005", "006", "007", - "008", "009", "010", "011", "012", - "013", "014", - "015", "016", "017", "018", @@ -22,9 +19,7 @@ "020", "021", "022", - "023", "024", - "025", "026", "027", "028" diff --git a/parser/testdata/parse/postgres_regress/inet.metadata.json b/parser/testdata/parse/postgres_regress/inet.metadata.json index 1211f6e..662889a 100644 --- a/parser/testdata/parse/postgres_regress/inet.metadata.json +++ b/parser/testdata/parse/postgres_regress/inet.metadata.json @@ -23,93 +23,24 @@ "021", "022", "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", "036", "037", "038", - "039", "040", - "041", "042", - "043", "044", - "045", "046", "047", "048", "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", "061", - "062", "063", "064", "065", "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", "078", - "079", "080", "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111" + "102" ] } diff --git a/parser/testdata/parse/postgres_regress/infinite_recurse.metadata.json b/parser/testdata/parse/postgres_regress/infinite_recurse.metadata.json index 3e33966..f23fe5c 100644 --- a/parser/testdata/parse/postgres_regress/infinite_recurse.metadata.json +++ b/parser/testdata/parse/postgres_regress/infinite_recurse.metadata.json @@ -1,7 +1,5 @@ { "todo": [ - "001", - "002", - "003" + "001" ] } diff --git a/parser/testdata/parse/postgres_regress/inherit.metadata.json b/parser/testdata/parse/postgres_regress/inherit.metadata.json index 53ffb30..808bc5a 100644 --- a/parser/testdata/parse/postgres_regress/inherit.metadata.json +++ b/parser/testdata/parse/postgres_regress/inherit.metadata.json @@ -28,55 +28,15 @@ "026", "027", "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", "037", "038", "039", "040", "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", "059", "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", "078", "079", "080", @@ -96,7 +56,6 @@ "094", "095", "096", - "097", "098", "099", "100", @@ -115,9 +74,7 @@ "113", "114", "115", - "116", "117", - "118", "119", "120", "121", @@ -128,11 +85,9 @@ "126", "127", "128", - "129", "130", "131", "132", - "133", "134", "135", "136", @@ -143,7 +98,6 @@ "141", "142", "143", - "144", "145", "146", "147", @@ -155,7 +109,6 @@ "153", "154", "155", - "156", "157", "158", "159", @@ -164,7 +117,6 @@ "162", "163", "164", - "165", "166", "167", "168", @@ -172,8 +124,6 @@ "170", "171", "172", - "173", - "174", "175", "176", "177", @@ -184,7 +134,6 @@ "182", "183", "184", - "185", "186", "187", "188", @@ -192,39 +141,29 @@ "190", "191", "192", - "193", "194", "195", "196", "197", - "198", "199", - "200", "201", "202", "203", "204", - "205", "206", "207", - "208", "209", - "210", "211", - "212", "213", "214", "215", "216", - "217", "218", "219", "220", "221", "222", - "223", "224", - "225", "226", "227", "228", @@ -269,7 +208,6 @@ "267", "268", "269", - "270", "271", "272", "273", @@ -295,8 +233,6 @@ "293", "294", "295", - "296", - "297", "298", "299", "300", @@ -304,7 +240,6 @@ "302", "303", "304", - "305", "306", "307", "308", @@ -343,7 +278,6 @@ "341", "342", "343", - "344", "345", "346", "347", @@ -356,10 +290,8 @@ "354", "355", "356", - "357", "358", "359", - "360", "361", "362", "363", @@ -376,20 +308,15 @@ "374", "375", "376", - "377", "378", - "379", "380", "381", "382", "383", - "384", "385", - "386", "387", "388", "389", - "390", "391", "392", "393", @@ -417,7 +344,6 @@ "415", "416", "417", - "418", "419", "420", "421", @@ -428,7 +354,6 @@ "426", "427", "428", - "429", "430", "431", "432", @@ -438,17 +363,13 @@ "436", "437", "438", - "439", "440", - "441", "442", "443", "444", "445", "446", "447", - "448", - "449", "450", "451", "452", @@ -475,8 +396,6 @@ "473", "474", "475", - "476", - "477", "478", "479", "480", @@ -533,7 +452,6 @@ "531", "532", "533", - "534", "535", "536", "537", diff --git a/parser/testdata/parse/postgres_regress/init_privs.metadata.json b/parser/testdata/parse/postgres_regress/init_privs.metadata.json index f1ffe06..d151fe5 100644 --- a/parser/testdata/parse/postgres_regress/init_privs.metadata.json +++ b/parser/testdata/parse/postgres_regress/init_privs.metadata.json @@ -1,6 +1,5 @@ { "todo": [ - "001", "002", "003", "004" diff --git a/parser/testdata/parse/postgres_regress/insert.metadata.json b/parser/testdata/parse/postgres_regress/insert.metadata.json index 1751d7d..5fd95ff 100644 --- a/parser/testdata/parse/postgres_regress/insert.metadata.json +++ b/parser/testdata/parse/postgres_regress/insert.metadata.json @@ -6,22 +6,17 @@ "004", "005", "006", - "007", "008", "009", "010", "011", - "012", "013", - "014", "015", - "016", "017", "018", "019", "020", "021", - "022", "023", "024", "025", @@ -41,7 +36,6 @@ "039", "040", "041", - "042", "043", "044", "045", @@ -72,8 +66,6 @@ "070", "071", "072", - "073", - "074", "075", "076", "077", @@ -143,7 +135,6 @@ "141", "142", "143", - "144", "145", "146", "147", @@ -158,14 +149,12 @@ "156", "157", "158", - "159", "160", "161", "162", "163", "164", "165", - "166", "167", "168", "169", @@ -179,7 +168,6 @@ "177", "178", "179", - "180", "181", "182", "183", @@ -189,7 +177,6 @@ "187", "188", "189", - "190", "191", "192", "193", @@ -197,7 +184,6 @@ "195", "196", "197", - "198", "199", "200", "201", @@ -206,11 +192,9 @@ "204", "205", "206", - "207", "208", "209", "210", - "211", "212", "213", "214", @@ -257,7 +241,6 @@ "255", "256", "257", - "258", "259", "260", "261", @@ -272,7 +255,6 @@ "270", "271", "272", - "273", "274", "275", "276", @@ -282,7 +264,6 @@ "280", "281", "282", - "283", "284", "285", "286", @@ -330,7 +311,6 @@ "328", "329", "330", - "331", "332", "333", "334", @@ -363,7 +343,6 @@ "361", "362", "363", - "364", "365", "366", "367", @@ -376,7 +355,6 @@ "374", "375", "376", - "377", "378", "379", "380", diff --git a/parser/testdata/parse/postgres_regress/insert_conflict.metadata.json b/parser/testdata/parse/postgres_regress/insert_conflict.metadata.json index 1b73a29..fd36aab 100644 --- a/parser/testdata/parse/postgres_regress/insert_conflict.metadata.json +++ b/parser/testdata/parse/postgres_regress/insert_conflict.metadata.json @@ -121,9 +121,7 @@ "119", "120", "121", - "122", "123", - "124", "125", "126", "127", @@ -135,18 +133,12 @@ "133", "134", "135", - "136", "137", "138", "139", - "140", "141", - "142", "143", - "144", - "145", "146", - "147", "148", "149", "150", @@ -170,7 +162,6 @@ "168", "169", "170", - "171", "172", "173", "174", @@ -191,7 +182,6 @@ "189", "190", "191", - "192", "193", "194", "195", @@ -202,29 +192,24 @@ "200", "201", "202", - "203", "204", "205", "206", "207", "208", - "209", "210", "211", "212", "213", "214", - "215", "216", "217", "218", "219", "220", - "221", "222", "223", "224", - "225", "226", "227", "228", @@ -249,7 +234,6 @@ "247", "248", "249", - "250", "251", "252", "253", diff --git a/parser/testdata/parse/postgres_regress/int2.metadata.json b/parser/testdata/parse/postgres_regress/int2.metadata.json index f476ef8..5e6664a 100644 --- a/parser/testdata/parse/postgres_regress/int2.metadata.json +++ b/parser/testdata/parse/postgres_regress/int2.metadata.json @@ -7,74 +7,6 @@ "005", "006", "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076" + "008" ] } diff --git a/parser/testdata/parse/postgres_regress/int4.metadata.json b/parser/testdata/parse/postgres_regress/int4.metadata.json index da94530..5e6664a 100644 --- a/parser/testdata/parse/postgres_regress/int4.metadata.json +++ b/parser/testdata/parse/postgres_regress/int4.metadata.json @@ -7,92 +7,6 @@ "005", "006", "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094" + "008" ] } diff --git a/parser/testdata/parse/postgres_regress/int8.metadata.json b/parser/testdata/parse/postgres_regress/int8.metadata.json index 6eafe87..b4c5d89 100644 --- a/parser/testdata/parse/postgres_regress/int8.metadata.json +++ b/parser/testdata/parse/postgres_regress/int8.metadata.json @@ -6,166 +6,6 @@ "004", "005", "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167" + "007" ] } diff --git a/parser/testdata/parse/postgres_regress/interval.metadata.json b/parser/testdata/parse/postgres_regress/interval.metadata.json index df238f5..972fdee 100644 --- a/parser/testdata/parse/postgres_regress/interval.metadata.json +++ b/parser/testdata/parse/postgres_regress/interval.metadata.json @@ -2,16 +2,6 @@ "todo": [ "001", "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", "013", "014", "015", @@ -27,421 +17,37 @@ "025", "026", "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", "049", "050", "051", "052", "053", "054", - "055", - "056", "057", "058", "059", - "060", "061", - "062", "063", "064", "065", - "066", - "067", - "068", - "069", "070", "071", "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", "096", "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", "163", - "164", "165", - "166", - "167", "168", - "169", - "170", - "171", "172", - "173", "174", - "175", "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", "339", - "340", "341", - "342", "343", - "344", "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", "376", "377", - "378", - "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "408", - "409", - "410", - "411", - "412", - "413", - "414", - "415", - "416", - "417", - "418", - "419", - "420", - "421", - "422", - "423", - "424", - "425", - "426", - "427", - "428", - "429", - "430", - "431", - "432", - "433", - "434", - "435", - "436", - "437", - "438", - "439", - "440", - "441", - "442", - "443" + "379" ] } diff --git a/parser/testdata/parse/postgres_regress/join.metadata.json b/parser/testdata/parse/postgres_regress/join.metadata.json index 3b007a6..3590d26 100644 --- a/parser/testdata/parse/postgres_regress/join.metadata.json +++ b/parser/testdata/parse/postgres_regress/join.metadata.json @@ -25,47 +25,6 @@ "023", "024", "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", "067", "068", "069", @@ -77,18 +36,6 @@ "075", "076", "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", "090", "091", "092", @@ -100,33 +47,14 @@ "098", "099", "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", "114", "115", "116", - "117", "118", "119", - "120", "121", - "122", - "123", "124", - "125", "126", - "127", "128", "129", "130", @@ -142,9 +70,7 @@ "140", "141", "142", - "143", "144", - "145", "146", "147", "148", @@ -170,20 +96,10 @@ "168", "169", "170", - "171", "172", - "173", "174", - "175", "176", "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", "185", "186", "187", @@ -192,8 +108,6 @@ "190", "191", "192", - "193", - "194", "195", "196", "197", @@ -203,14 +117,12 @@ "201", "202", "203", - "204", "205", "206", "207", "208", "209", "210", - "211", "212", "213", "214", @@ -222,7 +134,6 @@ "220", "221", "222", - "223", "224", "225", "226", @@ -238,7 +149,6 @@ "236", "237", "238", - "239", "240", "241", "242", @@ -247,16 +157,12 @@ "245", "246", "247", - "248", "249", "250", "251", "252", "253", - "254", "255", - "256", - "257", "258", "259", "260", @@ -266,7 +172,6 @@ "264", "265", "266", - "267", "268", "269", "270", @@ -277,10 +182,6 @@ "275", "276", "277", - "278", - "279", - "280", - "281", "282", "283", "284", @@ -292,12 +193,8 @@ "290", "291", "292", - "293", "294", - "295", - "296", "297", - "298", "299", "300", "301", @@ -311,13 +208,8 @@ "309", "310", "311", - "312", "313", - "314", "315", - "316", - "317", - "318", "319", "320", "321", @@ -326,16 +218,10 @@ "324", "325", "326", - "327", - "328", "329", - "330", "331", - "332", "333", - "334", "335", - "336", "337", "338", "339", @@ -354,9 +240,7 @@ "352", "353", "354", - "355", "356", - "357", "358", "359", "360", @@ -368,69 +252,43 @@ "366", "367", "368", - "369", "370", - "371", "372", - "373", "374", - "375", "376", - "377", "378", - "379", "380", - "381", "382", - "383", "384", - "385", "386", - "387", "388", - "389", "390", - "391", "392", - "393", "394", - "395", "396", "397", "398", - "399", "400", - "401", "402", - "403", "404", - "405", "406", "407", "408", "409", "410", - "411", "412", - "413", "414", "415", "416", "417", "418", - "419", "420", "421", "422", - "423", "424", - "425", "426", - "427", "428", - "429", "430", - "431", "432", "433", "434", @@ -471,26 +329,19 @@ "469", "470", "471", - "472", "473", - "474", "475", - "476", "477", - "478", "479", "480", "481", "482", "483", "484", - "485", - "486", "487", "488", "489", "490", - "491", "492", "493", "494", @@ -499,105 +350,50 @@ "497", "498", "499", - "500", "501", "502", "503", "504", "505", - "506", "507", "508", "509", "510", "511", "512", - "513", "514", "515", - "516", "517", "518", "519", "520", - "521", - "522", - "523", - "524", - "525", - "526", - "527", - "528", - "529", "530", - "531", "532", - "533", "534", "535", - "536", "537", - "538", - "539", - "540", "541", "542", "543", "544", - "545", "546", - "547", "548", - "549", "550", - "551", - "552", - "553", - "554", - "555", - "556", - "557", - "558", - "559", - "560", - "561", - "562", - "563", - "564", "565", - "566", "567", - "568", "569", - "570", "571", - "572", "573", - "574", "575", - "576", "577", "578", - "579", "580", "581", "582", "583", "584", - "585", - "586", "587", - "588", "589", - "590", - "591", - "592", - "593", - "594", - "595", - "596", - "597", - "598", "599", "600", "601", @@ -614,7 +410,6 @@ "612", "613", "614", - "615", "616", "617", "618", @@ -682,11 +477,8 @@ "680", "681", "682", - "683", "684", - "685", "686", - "687", "688", "689", "690", @@ -706,7 +498,6 @@ "704", "705", "706", - "707", "708", "709", "710", diff --git a/parser/testdata/parse/postgres_regress/join_hash.metadata.json b/parser/testdata/parse/postgres_regress/join_hash.metadata.json index 5bababc..e326b2b 100644 --- a/parser/testdata/parse/postgres_regress/join_hash.metadata.json +++ b/parser/testdata/parse/postgres_regress/join_hash.metadata.json @@ -27,8 +27,6 @@ "025", "026", "027", - "028", - "029", "030", "031", "032", @@ -36,8 +34,6 @@ "034", "035", "036", - "037", - "038", "039", "040", "041", @@ -45,16 +41,12 @@ "043", "044", "045", - "046", - "047", "048", "049", "050", "051", "052", "053", - "054", - "055", "056", "057", "058", @@ -62,8 +54,6 @@ "060", "061", "062", - "063", - "064", "065", "066", "067", @@ -71,17 +61,12 @@ "069", "070", "071", - "072", - "073", - "074", "075", "076", "077", "078", "079", "080", - "081", - "082", "083", "084", "085", @@ -89,8 +74,6 @@ "087", "088", "089", - "090", - "091", "092", "093", "094", @@ -98,16 +81,12 @@ "096", "097", "098", - "099", - "100", "101", "102", "103", "104", "105", "106", - "107", - "108", "109", "110", "111", @@ -115,8 +94,6 @@ "113", "114", "115", - "116", - "117", "118", "119", "120", @@ -124,15 +101,12 @@ "122", "123", "124", - "125", - "126", "127", "128", "129", "130", "131", "132", - "133", "134", "135", "136", @@ -150,8 +124,6 @@ "148", "149", "150", - "151", - "152", "153", "154", "155", @@ -165,8 +137,6 @@ "163", "164", "165", - "166", - "167", "168", "169", "170", @@ -180,8 +150,6 @@ "178", "179", "180", - "181", - "182", "183", "184", "185", @@ -195,40 +163,32 @@ "193", "194", "195", - "196", - "197", "198", "199", "200", "201", - "202", "203", "204", "205", "206", "207", - "208", "209", "210", "211", "212", - "213", "214", "215", "216", "217", - "218", "219", "220", "221", "222", "223", - "224", "225", "226", "227", "228", - "229", "230", "231", "232", @@ -236,8 +196,6 @@ "234", "235", "236", - "237", - "238", "239", "240", "241", @@ -249,10 +207,8 @@ "247", "248", "249", - "250", "251", "252", - "253", "254", "255", "256", @@ -270,14 +226,11 @@ "268", "269", "270", - "271", "272", - "273", "274", "275", "276", "277", - "278", "279" ] } diff --git a/parser/testdata/parse/postgres_regress/json.metadata.json b/parser/testdata/parse/postgres_regress/json.metadata.json index 15b4f09..5c6e68f 100644 --- a/parser/testdata/parse/postgres_regress/json.metadata.json +++ b/parser/testdata/parse/postgres_regress/json.metadata.json @@ -1,216 +1,16 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", "036", - "037", - "038", "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", "065", - "066", - "067", "068", - "069", - "070", "071", "072", - "073", "074", - "075", "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", "086", - "087", - "088", - "089", - "090", - "091", "092", "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", "212", "213", "214", @@ -219,121 +19,9 @@ "217", "218", "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", "332", "333", - "334", "335", "336", "337", @@ -341,124 +29,10 @@ "339", "340", "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", "374", "375", "376", "377", - "378", - "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "408", - "409", - "410", - "411", - "412", - "413", - "414", - "415", - "416", - "417", - "418", - "419", - "420", - "421", - "422", - "423", - "424", - "425", - "426", - "427", - "428", - "429", - "430", - "431", - "432", - "433", - "434", - "435", - "436", - "437", - "438", - "439", - "440", - "441", - "442", - "443", - "444", - "445", - "446", - "447", - "448", - "449", - "450", - "451", - "452", - "453", - "454", - "455", - "456", - "457", - "458", - "459", - "460" + "380" ] } diff --git a/parser/testdata/parse/postgres_regress/json_encoding.metadata.json b/parser/testdata/parse/postgres_regress/json_encoding.metadata.json index c30fd55..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/json_encoding.metadata.json +++ b/parser/testdata/parse/postgres_regress/json_encoding.metadata.json @@ -1,48 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/jsonb.metadata.json b/parser/testdata/parse/postgres_regress/jsonb.metadata.json index 4c380dc..d59256f 100644 --- a/parser/testdata/parse/postgres_regress/jsonb.metadata.json +++ b/parser/testdata/parse/postgres_regress/jsonb.metadata.json @@ -2,416 +2,23 @@ "todo": [ "001", "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", "036", - "037", - "038", "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", "058", "059", - "060", - "061", "062", "063", - "064", "065", - "066", "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", "077", - "078", "079", "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "1000", "1001", - "1002", - "1003", - "1004", - "1005", - "1006", - "1007", - "1008", - "1009", - "101", - "1010", - "1011", - "1012", - "1013", - "1014", - "1015", - "1016", - "1017", - "1018", - "1019", - "102", - "1020", - "1021", - "1022", - "1023", - "1024", - "1025", - "1026", - "1027", - "1028", - "1029", - "103", - "1030", - "1031", - "1032", - "1033", - "1034", - "1035", - "1036", - "1037", - "1038", - "1039", - "104", - "1040", - "1041", - "1042", - "1043", - "1044", - "1045", - "1046", - "1047", - "1048", - "1049", - "105", - "1050", - "1051", - "1052", - "1053", - "1054", - "1055", - "1056", - "1057", - "1058", - "1059", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", "266", "267", "268", "269", - "270", - "271", "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", "353", "354", "355", @@ -420,167 +27,17 @@ "358", "359", "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", - "376", - "377", - "378", - "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "408", - "409", - "410", - "411", - "412", - "413", - "414", - "415", - "416", - "417", - "418", - "419", - "420", - "421", - "422", - "423", - "424", - "425", - "426", - "427", - "428", - "429", - "430", - "431", - "432", - "433", - "434", - "435", - "436", - "437", - "438", - "439", - "440", "441", - "442", - "443", - "444", - "445", "446", "447", - "448", - "449", - "450", - "451", - "452", - "453", - "454", - "455", "456", "457", "458", "459", - "460", - "461", - "462", - "463", - "464", - "465", - "466", - "467", "468", "469", - "470", - "471", - "472", - "473", - "474", - "475", - "476", - "477", - "478", - "479", - "480", - "481", - "482", - "483", - "484", - "485", - "486", - "487", - "488", - "489", - "490", - "491", - "492", - "493", - "494", - "495", - "496", - "497", - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", - "517", - "518", "519", "520", - "521", "522", "523", "524", @@ -588,91 +45,15 @@ "526", "527", "528", - "529", - "530", - "531", - "532", - "533", - "534", - "535", - "536", - "537", - "538", - "539", - "540", - "541", - "542", - "543", - "544", - "545", - "546", - "547", - "548", - "549", - "550", - "551", - "552", - "553", - "554", - "555", "556", "557", - "558", - "559", - "560", - "561", - "562", - "563", - "564", - "565", - "566", - "567", - "568", - "569", "570", - "571", - "572", - "573", - "574", - "575", - "576", - "577", - "578", - "579", - "580", - "581", - "582", - "583", - "584", - "585", - "586", - "587", "588", - "589", - "590", - "591", - "592", - "593", - "594", - "595", - "596", - "597", - "598", - "599", "600", - "601", - "602", - "603", "604", - "605", - "606", - "607", "608", - "609", "610", "611", - "612", - "613", "614", "615", "616", @@ -680,68 +61,12 @@ "618", "619", "620", - "621", - "622", "623", "624", "625", - "626", - "627", - "628", - "629", - "630", - "631", - "632", - "633", - "634", - "635", - "636", - "637", - "638", - "639", - "640", - "641", - "642", - "643", - "644", "645", - "646", - "647", - "648", - "649", - "650", - "651", - "652", - "653", - "654", - "655", - "656", "657", "658", - "659", - "660", - "661", - "662", - "663", - "664", - "665", - "666", - "667", - "668", - "669", - "670", - "671", - "672", - "673", - "674", - "675", - "676", - "677", - "678", - "679", - "680", - "681", - "682", "683", "684", "685", @@ -749,301 +74,65 @@ "687", "688", "689", - "690", - "691", - "692", "693", "694", - "695", - "696", - "697", "698", "699", - "700", - "701", - "702", - "703", - "704", - "705", - "706", - "707", - "708", - "709", - "710", - "711", - "712", - "713", - "714", - "715", - "716", - "717", - "718", - "719", - "720", - "721", - "722", - "723", - "724", - "725", - "726", - "727", - "728", - "729", - "730", - "731", - "732", - "733", - "734", - "735", - "736", - "737", - "738", - "739", - "740", - "741", - "742", - "743", - "744", - "745", - "746", - "747", - "748", - "749", - "750", - "751", - "752", - "753", - "754", - "755", - "756", - "757", - "758", - "759", - "760", - "761", - "762", - "763", - "764", - "765", - "766", - "767", - "768", - "769", - "770", - "771", - "772", - "773", - "774", - "775", - "776", - "777", - "778", - "779", - "780", - "781", - "782", - "783", - "784", - "785", - "786", - "787", - "788", - "789", - "790", - "791", - "792", - "793", - "794", - "795", - "796", - "797", - "798", - "799", - "800", - "801", - "802", - "803", - "804", - "805", - "806", - "807", - "808", - "809", - "810", - "811", - "812", - "813", - "814", - "815", - "816", - "817", - "818", - "819", - "820", - "821", - "822", - "823", - "824", - "825", - "826", - "827", - "828", - "829", - "830", - "831", - "832", - "833", - "834", - "835", - "836", - "837", - "838", - "839", - "840", - "841", - "842", - "843", - "844", - "845", - "846", - "847", - "848", - "849", - "850", - "851", - "852", - "853", - "854", - "855", - "856", - "857", - "858", - "859", - "860", - "861", - "862", - "863", - "864", - "865", - "866", - "867", - "868", - "869", - "870", - "871", - "872", - "873", - "874", - "875", - "876", - "877", - "878", - "879", - "880", - "881", - "882", - "883", - "884", - "885", - "886", - "887", - "888", - "889", - "890", - "891", - "892", - "893", - "894", - "895", - "896", - "897", - "898", - "899", - "900", - "901", - "902", - "903", - "904", "905", "906", "907", - "908", "909", - "910", "911", - "912", "913", - "914", "915", - "916", - "917", - "918", - "919", "920", "921", - "922", "923", "924", - "925", "926", "927", - "928", "929", "930", "931", - "932", "933", - "934", "935", - "936", "937", "938", "939", - "940", "941", "942", "943", - "944", "945", "946", "947", - "948", "949", "950", "951", - "952", "953", "954", "955", - "956", "957", "958", "959", "960", - "961", "962", "963", "964", "965", - "966", "967", "968", "969", "970", - "971", "972", "973", "974", "975", - "976", "977", "978", "979", - "980", "981", "982", "983", - "984", "985", "986", "987", diff --git a/parser/testdata/parse/postgres_regress/jsonb_jsonpath.metadata.json b/parser/testdata/parse/postgres_regress/jsonb_jsonpath.metadata.json index b53b6f2..b848209 100644 --- a/parser/testdata/parse/postgres_regress/jsonb_jsonpath.metadata.json +++ b/parser/testdata/parse/postgres_regress/jsonb_jsonpath.metadata.json @@ -1,825 +1,16 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", - "376", - "377", - "378", - "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "408", - "409", - "410", - "411", - "412", - "413", - "414", - "415", - "416", - "417", - "418", - "419", - "420", - "421", - "422", - "423", - "424", - "425", - "426", - "427", - "428", - "429", - "430", - "431", - "432", - "433", - "434", - "435", - "436", - "437", - "438", - "439", - "440", - "441", - "442", - "443", - "444", - "445", - "446", - "447", - "448", - "449", - "450", - "451", - "452", - "453", - "454", - "455", - "456", - "457", - "458", - "459", - "460", - "461", - "462", - "463", - "464", - "465", - "466", - "467", - "468", - "469", - "470", - "471", - "472", - "473", - "474", - "475", - "476", - "477", - "478", - "479", - "480", - "481", - "482", - "483", - "484", - "485", - "486", - "487", - "488", - "489", - "490", - "491", - "492", - "493", - "494", - "495", - "496", - "497", - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", - "517", - "518", - "519", - "520", - "521", - "522", - "523", "524", "525", - "526", "527", - "528", - "529", "530", "531", "532", - "533", - "534", "535", - "536", - "537", - "538", - "539", - "540", - "541", - "542", - "543", - "544", - "545", - "546", - "547", - "548", - "549", - "550", - "551", - "552", - "553", - "554", - "555", - "556", - "557", - "558", - "559", - "560", - "561", - "562", - "563", - "564", - "565", - "566", - "567", - "568", - "569", - "570", - "571", - "572", - "573", - "574", - "575", - "576", - "577", - "578", - "579", - "580", - "581", - "582", - "583", - "584", - "585", - "586", - "587", - "588", - "589", - "590", - "591", - "592", - "593", - "594", - "595", - "596", - "597", - "598", - "599", - "600", - "601", - "602", - "603", - "604", - "605", - "606", - "607", - "608", - "609", - "610", - "611", - "612", - "613", - "614", - "615", - "616", - "617", - "618", - "619", - "620", "621", - "622", - "623", - "624", - "625", - "626", - "627", - "628", - "629", - "630", - "631", - "632", - "633", - "634", - "635", - "636", - "637", - "638", - "639", - "640", - "641", - "642", "643", - "644", - "645", - "646", - "647", - "648", - "649", - "650", - "651", - "652", - "653", - "654", - "655", - "656", - "657", - "658", - "659", - "660", - "661", - "662", - "663", "664", - "665", - "666", - "667", - "668", - "669", - "670", - "671", - "672", - "673", - "674", - "675", - "676", - "677", - "678", - "679", - "680", - "681", - "682", - "683", - "684", - "685", - "686", - "687", - "688", - "689", - "690", - "691", "692", - "693", - "694", - "695", - "696", - "697", - "698", - "699", - "700", - "701", - "702", - "703", - "704", - "705", - "706", - "707", - "708", - "709", - "710", - "711", - "712", - "713", - "714", - "715", - "716", - "717", - "718", - "719", - "720", - "721", - "722", - "723", - "724", - "725", - "726", - "727", - "728", - "729", - "730", - "731", - "732", - "733", - "734", - "735", - "736", - "737", - "738", - "739", - "740", - "741", - "742", - "743", - "744", - "745", - "746", - "747", - "748", - "749", - "750", - "751", - "752", - "753", - "754", - "755", - "756", - "757", - "758", - "759", - "760", - "761", - "762", - "763", - "764", - "765", - "766", - "767", - "768", - "769", - "770", - "771", - "772", - "773", - "774", - "775", - "776", - "777", - "778", - "779", - "780", - "781", - "782", - "783", - "784", - "785", - "786", - "787", - "788", - "789", - "790", - "791", - "792", - "793", - "794", - "795", - "796", - "797", - "798", - "799", - "800", - "801", - "802", - "803", - "804", - "805", - "806", - "807", - "808", - "809", - "810", - "811", - "812", - "813", - "814", - "815", - "816", - "817", - "818", - "819", - "820", - "821" + "777" ] } diff --git a/parser/testdata/parse/postgres_regress/jsonpath.metadata.json b/parser/testdata/parse/postgres_regress/jsonpath.metadata.json index 402e8ee..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/jsonpath.metadata.json +++ b/parser/testdata/parse/postgres_regress/jsonpath.metadata.json @@ -1,228 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/jsonpath_encoding.metadata.json b/parser/testdata/parse/postgres_regress/jsonpath_encoding.metadata.json index efb3a10..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/jsonpath_encoding.metadata.json +++ b/parser/testdata/parse/postgres_regress/jsonpath_encoding.metadata.json @@ -1,36 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/largeobject.metadata.json b/parser/testdata/parse/postgres_regress/largeobject.metadata.json index 48ba122..c09cd46 100644 --- a/parser/testdata/parse/postgres_regress/largeobject.metadata.json +++ b/parser/testdata/parse/postgres_regress/largeobject.metadata.json @@ -2,7 +2,6 @@ "todo": [ "001", "002", - "003", "004", "005", "006", @@ -12,115 +11,45 @@ "010", "011", "012", - "013", - "014", "015", - "016", "017", "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", "027", "028", - "029", "030", "031", "032", "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", "044", "045", "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", "060", - "061", "062", "063", "064", "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", "075", - "076", - "077", - "078", "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", "091", "092", - "093", - "094", "095", "096", - "097", "098", "099", - "100", "101", "102", - "103", "104", "105", - "106", "107", "108", - "109", "110", "111", - "112", "113", "114", - "115", "116", "117", - "118", "119", "120", - "121", "122", "123", "124" diff --git a/parser/testdata/parse/postgres_regress/limit.metadata.json b/parser/testdata/parse/postgres_regress/limit.metadata.json index fb87925..e8c8068 100644 --- a/parser/testdata/parse/postgres_regress/limit.metadata.json +++ b/parser/testdata/parse/postgres_regress/limit.metadata.json @@ -1,16 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", "012", "013", "014", @@ -50,30 +39,14 @@ "048", "049", "050", - "051", "052", "053", - "054", - "055", "056", - "057", - "058", "059", - "060", "061", - "062", "063", - "064", "065", - "066", "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", "075", "076", "077", diff --git a/parser/testdata/parse/postgres_regress/line.metadata.json b/parser/testdata/parse/postgres_regress/line.metadata.json index bfeb57a..880b1d2 100644 --- a/parser/testdata/parse/postgres_regress/line.metadata.json +++ b/parser/testdata/parse/postgres_regress/line.metadata.json @@ -22,18 +22,6 @@ "020", "021", "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035" + "023" ] } diff --git a/parser/testdata/parse/postgres_regress/lock.metadata.json b/parser/testdata/parse/postgres_regress/lock.metadata.json index 507be8d..ac56e94 100644 --- a/parser/testdata/parse/postgres_regress/lock.metadata.json +++ b/parser/testdata/parse/postgres_regress/lock.metadata.json @@ -35,27 +35,21 @@ "033", "034", "035", - "036", "037", "038", "039", - "040", "041", "042", "043", - "044", "045", "046", "047", - "048", "049", "050", "051", - "052", "053", "054", "055", - "056", "057", "058", "059", @@ -92,7 +86,6 @@ "090", "091", "092", - "093", "094", "095", "096", @@ -111,7 +104,6 @@ "109", "110", "111", - "112", "113", "114", "115", @@ -129,7 +121,6 @@ "127", "128", "129", - "130", - "131" + "130" ] } diff --git a/parser/testdata/parse/postgres_regress/lseg.metadata.json b/parser/testdata/parse/postgres_regress/lseg.metadata.json index e71b2c2..70c818b 100644 --- a/parser/testdata/parse/postgres_regress/lseg.metadata.json +++ b/parser/testdata/parse/postgres_regress/lseg.metadata.json @@ -12,9 +12,6 @@ "010", "011", "012", - "013", - "014", - "015", - "016" + "013" ] } diff --git a/parser/testdata/parse/postgres_regress/macaddr.metadata.json b/parser/testdata/parse/postgres_regress/macaddr.metadata.json index bfeb57a..7cf15e3 100644 --- a/parser/testdata/parse/postgres_regress/macaddr.metadata.json +++ b/parser/testdata/parse/postgres_regress/macaddr.metadata.json @@ -15,25 +15,8 @@ "013", "014", "015", - "016", "017", "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035" + "031" ] } diff --git a/parser/testdata/parse/postgres_regress/macaddr8.metadata.json b/parser/testdata/parse/postgres_regress/macaddr8.metadata.json index fb72ee9..0bcd944 100644 --- a/parser/testdata/parse/postgres_regress/macaddr8.metadata.json +++ b/parser/testdata/parse/postgres_regress/macaddr8.metadata.json @@ -1,26 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", "022", "023", "024", @@ -43,33 +22,8 @@ "041", "042", "043", - "044", "045", "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071" + "067" ] } diff --git a/parser/testdata/parse/postgres_regress/maintain_every.metadata.json b/parser/testdata/parse/postgres_regress/maintain_every.metadata.json index e71b2c2..51a26a2 100644 --- a/parser/testdata/parse/postgres_regress/maintain_every.metadata.json +++ b/parser/testdata/parse/postgres_regress/maintain_every.metadata.json @@ -7,12 +7,10 @@ "005", "006", "007", - "008", "009", "010", "011", "012", - "013", "014", "015", "016" diff --git a/parser/testdata/parse/postgres_regress/matview.metadata.json b/parser/testdata/parse/postgres_regress/matview.metadata.json index 784b93c..dae74a1 100644 --- a/parser/testdata/parse/postgres_regress/matview.metadata.json +++ b/parser/testdata/parse/postgres_regress/matview.metadata.json @@ -3,18 +3,12 @@ "001", "002", "003", - "004", "005", "006", - "007", - "008", "009", - "010", "011", - "012", "013", "014", - "015", "016", "017", "018", @@ -29,19 +23,12 @@ "027", "028", "029", - "030", - "031", "032", "033", - "034", - "035", "036", "037", "038", "039", - "040", - "041", - "042", "043", "044", "045", @@ -49,13 +36,8 @@ "047", "048", "049", - "050", - "051", - "052", "053", "054", - "055", - "056", "057", "058", "059", @@ -64,7 +46,6 @@ "062", "063", "064", - "065", "066", "067", "068", @@ -92,7 +73,6 @@ "090", "091", "092", - "093", "094", "095", "096", @@ -110,14 +90,8 @@ "108", "109", "110", - "111", - "112", - "113", - "114", - "115", "116", "117", - "118", "119", "120", "121", @@ -126,8 +100,6 @@ "124", "125", "126", - "127", - "128", "129", "130", "131", @@ -150,9 +122,6 @@ "148", "149", "150", - "151", - "152", - "153", "154", "155", "156", diff --git a/parser/testdata/parse/postgres_regress/md5.metadata.json b/parser/testdata/parse/postgres_regress/md5.metadata.json index 5a08d01..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/md5.metadata.json +++ b/parser/testdata/parse/postgres_regress/md5.metadata.json @@ -1,18 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/memoize.metadata.json b/parser/testdata/parse/postgres_regress/memoize.metadata.json index abfc1a2..4c3e878 100644 --- a/parser/testdata/parse/postgres_regress/memoize.metadata.json +++ b/parser/testdata/parse/postgres_regress/memoize.metadata.json @@ -3,30 +3,20 @@ "001", "002", "003", - "004", - "005", - "006", - "007", - "008", - "009", "010", "011", "012", "013", "014", "015", - "016", "017", "018", "019", - "020", "021", "022", "023", "024", "025", - "026", - "027", "028", "029", "030", @@ -34,8 +24,6 @@ "032", "033", "034", - "035", - "036", "037", "038", "039", @@ -46,13 +34,10 @@ "044", "045", "046", - "047", "048", - "049", "050", "051", "052", - "053", "054", "055", "056", @@ -64,7 +49,6 @@ "062", "063", "064", - "065", "066", "067", "068", diff --git a/parser/testdata/parse/postgres_regress/merge.metadata.json b/parser/testdata/parse/postgres_regress/merge.metadata.json index 168c3f9..c5340df 100644 --- a/parser/testdata/parse/postgres_regress/merge.metadata.json +++ b/parser/testdata/parse/postgres_regress/merge.metadata.json @@ -10,7 +10,6 @@ "008", "009", "010", - "011", "012", "013", "014", @@ -54,18 +53,14 @@ "052", "053", "054", - "055", - "056", "057", "058", "059", "060", "061", - "062", "063", "064", "065", - "066", "067", "068", "069", @@ -77,27 +72,19 @@ "075", "076", "077", - "078", - "079", "080", "081", - "082", "083", "084", "085", - "086", "087", "088", "089", - "090", "091", "092", "093", - "094", "095", "096", - "097", - "098", "099", "100", "101", @@ -106,54 +93,41 @@ "104", "105", "106", - "107", - "108", "109", "110", "111", - "112", "113", "114", "115", - "116", - "117", "118", "119", "120", "121", - "122", "123", "124", "125", - "126", "127", "128", "129", - "130", "131", "132", "133", - "134", "135", "136", "137", "138", "139", - "140", "141", "142", "143", "144", - "145", "146", "147", "148", "149", - "150", "151", "152", "153", - "154", "155", "156", "157", @@ -163,45 +137,30 @@ "161", "162", "163", - "164", "165", "166", - "167", "168", - "169", "170", "171", - "172", "173", "174", "175", - "176", "177", "178", - "179", "180", "181", - "182", "183", - "184", "185", - "186", "187", - "188", "189", - "190", "191", - "192", "193", - "194", "195", "196", - "197", "198", "199", "200", "201", - "202", "203", "204", "205", @@ -219,18 +178,14 @@ "217", "218", "219", - "220", "221", "222", "223", "224", - "225", "226", "227", - "228", "229", "230", - "231", "232", "233", "234", @@ -238,42 +193,32 @@ "236", "237", "238", - "239", "240", "241", "242", - "243", "244", "245", "246", - "247", "248", "249", "250", - "251", "252", "253", "254", - "255", "256", "257", "258", - "259", "260", "261", "262", - "263", - "264", "265", "266", "267", "268", - "269", "270", "271", "272", "273", - "274", "275", "276", "277", @@ -281,12 +226,10 @@ "279", "280", "281", - "282", "283", "284", "285", "286", - "287", "288", "289", "290", @@ -294,55 +237,39 @@ "292", "293", "294", - "295", "296", "297", "298", "299", "300", - "301", - "302", "303", "304", "305", "306", "307", - "308", "309", "310", "311", "312", "313", - "314", "315", "316", "317", "318", "319", "320", - "321", "322", "323", "324", - "325", "326", "327", "328", - "329", "330", "331", "332", "333", "334", "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", "344", "345", "346", @@ -352,15 +279,12 @@ "350", "351", "352", - "353", "354", "355", "356", - "357", "358", "359", "360", - "361", "362", "363", "364", @@ -373,25 +297,19 @@ "371", "372", "373", - "374", "375", "376", "377", - "378", "379", "380", "381", - "382", - "383", "384", "385", "386", - "387", "388", "389", "390", "391", - "392", "393", "394", "395", @@ -407,27 +325,22 @@ "405", "406", "407", - "408", "409", "410", "411", - "412", "413", "414", "415", - "416", "417", "418", "419", "420", "421", - "422", "423", "424", "425", "426", "427", - "428", "429", "430", "431", @@ -450,7 +363,6 @@ "448", "449", "450", - "451", "452", "453", "454", @@ -460,7 +372,6 @@ "458", "459", "460", - "461", "462", "463", "464", @@ -480,9 +391,7 @@ "478", "479", "480", - "481", "482", - "483", "484", "485", "486", @@ -491,7 +400,6 @@ "489", "490", "491", - "492", "493", "494", "495", @@ -508,7 +416,6 @@ "506", "507", "508", - "509", "510", "511", "512", @@ -520,29 +427,23 @@ "518", "519", "520", - "521", "522", "523", - "524", "525", "526", - "527", "528", "529", - "530", "531", "532", "533", "534", "535", - "536", "537", "538", "539", "540", "541", "542", - "543", "544", "545", "546", @@ -551,7 +452,6 @@ "549", "550", "551", - "552", "553", "554", "555", @@ -559,7 +459,6 @@ "557", "558", "559", - "560", "561", "562", "563", diff --git a/parser/testdata/parse/postgres_regress/misc.metadata.json b/parser/testdata/parse/postgres_regress/misc.metadata.json index 6a71114..222cfd0 100644 --- a/parser/testdata/parse/postgres_regress/misc.metadata.json +++ b/parser/testdata/parse/postgres_regress/misc.metadata.json @@ -4,19 +4,15 @@ "002", "003", "004", - "005", "006", "007", "008", "009", "010", "011", - "012", - "013", "014", "015", "016", - "017", "018", "019", "020", @@ -36,30 +32,6 @@ "034", "035", "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061" + "037" ] } diff --git a/parser/testdata/parse/postgres_regress/misc_functions.metadata.json b/parser/testdata/parse/postgres_regress/misc_functions.metadata.json index b6ecb7b..befbdec 100644 --- a/parser/testdata/parse/postgres_regress/misc_functions.metadata.json +++ b/parser/testdata/parse/postgres_regress/misc_functions.metadata.json @@ -1,95 +1,14 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", "048", - "049", "050", - "051", "052", - "053", "054", "055", "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", "083", - "084", - "085", - "086", "087", - "088", - "089", - "090", "091", "092", "093", @@ -99,25 +18,11 @@ "097", "098", "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", "111", - "112", "113", - "114", "115", "116", "117", - "118", "119" ] } diff --git a/parser/testdata/parse/postgres_regress/misc_sanity.metadata.json b/parser/testdata/parse/postgres_regress/misc_sanity.metadata.json index e8e06a4..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/misc_sanity.metadata.json +++ b/parser/testdata/parse/postgres_regress/misc_sanity.metadata.json @@ -1,9 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/money.metadata.json b/parser/testdata/parse/postgres_regress/money.metadata.json index c169184..6987d00 100644 --- a/parser/testdata/parse/postgres_regress/money.metadata.json +++ b/parser/testdata/parse/postgres_regress/money.metadata.json @@ -2,112 +2,17 @@ "todo": [ "001", "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", "039", "040", - "041", "042", "043", - "044", "045", "046", - "047", "048", "049", - "050", "051", "052", - "053", "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109" + "055" ] } diff --git a/parser/testdata/parse/postgres_regress/multirangetypes.metadata.json b/parser/testdata/parse/postgres_regress/multirangetypes.metadata.json index 6769ac6..e17434e 100644 --- a/parser/testdata/parse/postgres_regress/multirangetypes.metadata.json +++ b/parser/testdata/parse/postgres_regress/multirangetypes.metadata.json @@ -1,72 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", "068", "069", "070", @@ -80,291 +13,7 @@ "078", "079", "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", "366", "367", "368", @@ -376,109 +25,12 @@ "374", "375", "376", - "377", - "378", - "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "408", - "409", - "410", - "411", - "412", - "413", "414", "415", "416", - "417", - "418", - "419", - "420", - "421", - "422", - "423", - "424", - "425", - "426", - "427", - "428", - "429", - "430", - "431", - "432", - "433", - "434", - "435", - "436", - "437", - "438", - "439", - "440", - "441", - "442", - "443", - "444", - "445", - "446", - "447", - "448", - "449", - "450", - "451", - "452", - "453", - "454", "455", "456", "457", - "458", - "459", - "460", - "461", - "462", - "463", - "464", - "465", - "466", - "467", - "468", - "469", - "470", - "471", - "472", - "473", - "474", - "475", - "476", - "477", - "478", - "479", "480", "481", "482", @@ -486,40 +38,28 @@ "484", "485", "486", - "487", - "488", - "489", "490", "491", "492", - "493", "494", "495", "496", - "497", "498", "499", "500", - "501", "502", "503", "504", "505", - "506", "507", "508", - "509", "510", "511", "512", - "513", "514", "515", - "516", - "517", "518", "519", - "520", "521", "522", "523", @@ -530,10 +70,6 @@ "528", "529", "530", - "531", - "532", - "533", - "534", "535", "536", "537", @@ -551,57 +87,31 @@ "549", "550", "551", - "552", - "553", "554", "555", "556", "557", - "558", - "559", "560", - "561", - "562", "563", - "564", - "565", - "566", "567", "568", - "569", - "570", "571", "572", - "573", "574", "575", - "576", "577", - "578", - "579", - "580", - "581", "582", "583", - "584", "585", "586", - "587", "588", "589", - "590", "591", - "592", "593", - "594", "595", - "596", "597", - "598", "599", - "600", "601", - "602", "603", "604", "605" diff --git a/parser/testdata/parse/postgres_regress/mvcc.metadata.json b/parser/testdata/parse/postgres_regress/mvcc.metadata.json index 4739b17..5d6e121 100644 --- a/parser/testdata/parse/postgres_regress/mvcc.metadata.json +++ b/parser/testdata/parse/postgres_regress/mvcc.metadata.json @@ -7,9 +7,7 @@ "005", "006", "007", - "008", "009", - "010", "011" ] } diff --git a/parser/testdata/parse/postgres_regress/name.metadata.json b/parser/testdata/parse/postgres_regress/name.metadata.json index 32e0be1..1dd35ff 100644 --- a/parser/testdata/parse/postgres_regress/name.metadata.json +++ b/parser/testdata/parse/postgres_regress/name.metadata.json @@ -1,7 +1,5 @@ { "todo": [ - "001", - "002", "003", "004", "005", @@ -10,35 +8,7 @@ "008", "009", "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040" + "023" ] } diff --git a/parser/testdata/parse/postgres_regress/namespace.metadata.json b/parser/testdata/parse/postgres_regress/namespace.metadata.json index 6e8763d..87f2b47 100644 --- a/parser/testdata/parse/postgres_regress/namespace.metadata.json +++ b/parser/testdata/parse/postgres_regress/namespace.metadata.json @@ -1,6 +1,5 @@ { "todo": [ - "001", "002", "003", "004", @@ -15,19 +14,14 @@ "013", "014", "015", - "016", "017", "018", "019", - "020", - "021", "022", - "023", "024", "025", "026", "027", - "028", "029", "030", "031", diff --git a/parser/testdata/parse/postgres_regress/numeric.metadata.json b/parser/testdata/parse/postgres_regress/numeric.metadata.json index e7297cf..beae823 100644 --- a/parser/testdata/parse/postgres_regress/numeric.metadata.json +++ b/parser/testdata/parse/postgres_regress/numeric.metadata.json @@ -102,24 +102,9 @@ "100", "1000", "1001", - "1002", "1003", "1004", - "1005", - "1006", - "1007", - "1008", - "1009", "101", - "1010", - "1011", - "1012", - "1013", - "1014", - "1015", - "1016", - "1017", - "1018", "102", "103", "104", @@ -509,97 +494,28 @@ "488", "489", "490", - "491", "492", "493", - "494", "495", "496", - "497", "498", "499", - "500", "501", "502", - "503", "504", "505", - "506", "507", "508", - "509", "510", "511", - "512", "513", "514", - "515", "516", "517", - "518", "519", "520", - "521", "522", "523", - "524", - "525", - "526", - "527", - "528", - "529", - "530", - "531", - "532", - "533", - "534", - "535", - "536", - "537", - "538", - "539", - "540", - "541", - "542", - "543", - "544", - "545", - "546", - "547", - "548", - "549", - "550", - "551", - "552", - "553", - "554", - "555", - "556", - "557", - "558", - "559", - "560", - "561", - "562", - "563", - "564", - "565", - "566", - "567", - "568", - "569", - "570", - "571", - "572", - "573", - "574", - "575", - "576", - "577", - "578", - "579", - "580", - "581", "582", "583", "584", @@ -612,42 +528,7 @@ "591", "592", "593", - "594", "595", - "596", - "597", - "598", - "599", - "600", - "601", - "602", - "603", - "604", - "605", - "606", - "607", - "608", - "609", - "610", - "611", - "612", - "613", - "614", - "615", - "616", - "617", - "618", - "619", - "620", - "621", - "622", - "623", - "624", - "625", - "626", - "627", - "628", - "629", "630", "631", "632", @@ -656,120 +537,12 @@ "635", "636", "637", - "638", "639", - "640", - "641", - "642", - "643", - "644", - "645", - "646", - "647", - "648", - "649", - "650", - "651", - "652", - "653", - "654", - "655", - "656", - "657", - "658", - "659", - "660", - "661", - "662", - "663", - "664", - "665", - "666", - "667", "668", "669", "670", - "671", - "672", - "673", - "674", - "675", - "676", - "677", "678", - "679", - "680", - "681", - "682", - "683", - "684", - "685", - "686", - "687", - "688", - "689", - "690", - "691", - "692", - "693", - "694", - "695", - "696", - "697", - "698", - "699", - "700", - "701", - "702", - "703", - "704", - "705", - "706", - "707", - "708", - "709", - "710", - "711", - "712", - "713", - "714", - "715", - "716", - "717", - "718", - "719", - "720", - "721", - "722", - "723", - "724", - "725", - "726", - "727", - "728", "729", - "730", - "731", - "732", - "733", - "734", - "735", - "736", - "737", - "738", - "739", - "740", - "741", - "742", - "743", - "744", - "745", - "746", - "747", - "748", - "749", - "750", - "751", "752", "753", "754", @@ -823,15 +596,6 @@ "802", "803", "804", - "805", - "806", - "807", - "808", - "809", - "810", - "811", - "812", - "813", "814", "815", "816", @@ -842,180 +606,25 @@ "821", "822", "823", - "824", "825", "826", "827", "828", "829", "830", - "831", - "832", - "833", - "834", - "835", - "836", - "837", - "838", - "839", - "840", - "841", - "842", - "843", - "844", - "845", - "846", - "847", - "848", - "849", - "850", - "851", - "852", - "853", - "854", - "855", - "856", - "857", - "858", - "859", - "860", - "861", - "862", - "863", - "864", - "865", - "866", - "867", - "868", - "869", - "870", - "871", - "872", - "873", - "874", - "875", - "876", - "877", - "878", - "879", - "880", - "881", - "882", - "883", - "884", - "885", - "886", - "887", - "888", - "889", - "890", - "891", - "892", - "893", - "894", - "895", - "896", - "897", - "898", - "899", - "900", - "901", - "902", - "903", - "904", - "905", - "906", - "907", - "908", - "909", - "910", - "911", - "912", - "913", - "914", - "915", - "916", - "917", - "918", - "919", - "920", - "921", - "922", - "923", - "924", - "925", - "926", - "927", - "928", - "929", - "930", - "931", - "932", - "933", - "934", - "935", - "936", - "937", - "938", - "939", - "940", - "941", - "942", - "943", - "944", - "945", - "946", - "947", - "948", - "949", - "950", - "951", - "952", - "953", - "954", - "955", - "956", - "957", - "958", - "959", - "960", - "961", - "962", - "963", - "964", - "965", - "966", - "967", - "968", - "969", - "970", - "971", - "972", - "973", - "974", - "975", - "976", - "977", - "978", - "979", - "980", - "981", "982", "983", "984", "985", "986", "987", - "988", "989", "990", "991", "992", - "993", "994", "995", "996", - "997", "998", "999" ] diff --git a/parser/testdata/parse/postgres_regress/numeric_big.metadata.json b/parser/testdata/parse/postgres_regress/numeric_big.metadata.json index 05e97cf..b9b3672 100644 --- a/parser/testdata/parse/postgres_regress/numeric_big.metadata.json +++ b/parser/testdata/parse/postgres_regress/numeric_big.metadata.json @@ -500,57 +500,27 @@ "498", "499", "500", - "501", "502", "503", - "504", "505", "506", - "507", "508", "509", - "510", "511", "512", - "513", "514", "515", - "516", "517", "518", - "519", "520", "521", - "522", "523", "524", - "525", "526", "527", - "528", "529", "530", - "531", "532", - "533", - "534", - "535", - "536", - "537", - "538", - "539", - "540", - "541", - "542", - "543", - "544", - "545", - "546", - "547", - "548", - "549", - "550", - "551", - "552" + "533" ] } diff --git a/parser/testdata/parse/postgres_regress/numerology.metadata.json b/parser/testdata/parse/postgres_regress/numerology.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/numerology.metadata.json +++ b/parser/testdata/parse/postgres_regress/numerology.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/object_address.metadata.json b/parser/testdata/parse/postgres_regress/object_address.metadata.json index 5c84308..77c7007 100644 --- a/parser/testdata/parse/postgres_regress/object_address.metadata.json +++ b/parser/testdata/parse/postgres_regress/object_address.metadata.json @@ -36,50 +36,14 @@ "034", "035", "036", - "037", - "038", - "039", "040", - "041", - "042", - "043", - "044", "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", "074", "075", "076", "077", "078", "079", - "080", - "081" + "080" ] } diff --git a/parser/testdata/parse/postgres_regress/oid.metadata.json b/parser/testdata/parse/postgres_regress/oid.metadata.json index 6a83420..9057780 100644 --- a/parser/testdata/parse/postgres_regress/oid.metadata.json +++ b/parser/testdata/parse/postgres_regress/oid.metadata.json @@ -19,23 +19,6 @@ "017", "018", "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", "037" ] } diff --git a/parser/testdata/parse/postgres_regress/opr_sanity.metadata.json b/parser/testdata/parse/postgres_regress/opr_sanity.metadata.json index 304478c..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/opr_sanity.metadata.json +++ b/parser/testdata/parse/postgres_regress/opr_sanity.metadata.json @@ -1,134 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/partition_aggregate.metadata.json b/parser/testdata/parse/postgres_regress/partition_aggregate.metadata.json index e6f6795..2fd978c 100644 --- a/parser/testdata/parse/postgres_regress/partition_aggregate.metadata.json +++ b/parser/testdata/parse/postgres_regress/partition_aggregate.metadata.json @@ -11,25 +11,17 @@ "009", "010", "011", - "012", "013", - "014", "015", "016", "017", "018", - "019", "020", - "021", "022", "023", - "024", "025", - "026", "027", - "028", "029", - "030", "031", "032", "033", @@ -47,26 +39,17 @@ "045", "046", "047", - "048", "049", - "050", "051", "052", "053", - "054", "055", "056", - "057", "058", - "059", "060", - "061", "062", - "063", "064", - "065", "066", - "067", "068", "069", "070", @@ -74,11 +57,8 @@ "072", "073", "074", - "075", "076", - "077", "078", - "079", "080", "081", "082", @@ -94,23 +74,16 @@ "092", "093", "094", - "095", "096", "097", "098", - "099", "100", - "101", "102", - "103", "104", "105", "106", - "107", "108", - "109", "110", - "111", "112", "113", "114", @@ -119,21 +92,16 @@ "117", "118", "119", - "120", "121", - "122", "123", "124", "125", "126", - "127", "128", "129", "130", - "131", "132", "133", - "134", - "135" + "134" ] } diff --git a/parser/testdata/parse/postgres_regress/partition_info.metadata.json b/parser/testdata/parse/postgres_regress/partition_info.metadata.json index 2ff9db8..6cd26b2 100644 --- a/parser/testdata/parse/postgres_regress/partition_info.metadata.json +++ b/parser/testdata/parse/postgres_regress/partition_info.metadata.json @@ -1,11 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", "007", "008", "009", @@ -13,10 +7,6 @@ "011", "012", "013", - "014", - "015", - "016", - "017", "018", "019", "020", @@ -30,46 +20,13 @@ "028", "029", "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", "049", "050", - "051", - "052", - "053", "054", "055", "056", "057", "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", "071", "072", "073" diff --git a/parser/testdata/parse/postgres_regress/partition_join.metadata.json b/parser/testdata/parse/postgres_regress/partition_join.metadata.json index 6fa7813..19820db 100644 --- a/parser/testdata/parse/postgres_regress/partition_join.metadata.json +++ b/parser/testdata/parse/postgres_regress/partition_join.metadata.json @@ -20,38 +20,23 @@ "018", "019", "020", - "021", "022", - "023", "024", - "025", "026", - "027", "028", - "029", "030", - "031", "032", - "033", "034", - "035", "036", - "037", "038", - "039", "040", - "041", "042", - "043", "044", "045", - "046", "047", - "048", "049", "050", "051", - "052", "053", "054", "055", @@ -71,33 +56,20 @@ "069", "070", "071", - "072", "073", - "074", "075", - "076", "077", - "078", "079", - "080", "081", - "082", "083", - "084", "085", - "086", "087", - "088", "089", "090", "091", - "092", "093", - "094", "095", - "096", "097", - "098", "099", "100", "101", @@ -113,7 +85,6 @@ "111", "112", "113", - "114", "115", "116", "117", @@ -133,7 +104,6 @@ "131", "132", "133", - "134", "135", "136", "137", @@ -157,7 +127,6 @@ "155", "156", "157", - "158", "159", "160", "161", @@ -193,18 +162,12 @@ "191", "192", "193", - "194", "195", - "196", "197", - "198", "199", - "200", "201", - "202", "203", "204", - "205", "206", "207", "208", @@ -253,9 +216,7 @@ "251", "252", "253", - "254", "255", - "256", "257", "258", "259", @@ -273,31 +234,21 @@ "271", "272", "273", - "274", "275", - "276", "277", - "278", "279", - "280", "281", - "282", "283", "284", "285", "286", - "287", "288", - "289", "290", - "291", "292", "293", - "294", "295", "296", "297", - "298", "299", "300", "301", @@ -317,7 +268,6 @@ "315", "316", "317", - "318", "319", "320", "321", @@ -338,7 +288,6 @@ "336", "337", "338", - "339", "340", "341", "342", @@ -356,14 +305,12 @@ "354", "355", "356", - "357", "358", "359", "360", "361", "362", "363", - "364", "365", "366", "367", @@ -379,27 +326,18 @@ "377", "378", "379", - "380", "381", - "382", "383", - "384", "385", - "386", "387", - "388", "389", "390", "391", "392", - "393", "394", - "395", "396", - "397", "398", "399", - "400", "401", "402", "403", @@ -427,15 +365,10 @@ "425", "426", "427", - "428", "429", - "430", "431", - "432", "433", - "434", "435", - "436", "437", "438", "439", @@ -445,20 +378,15 @@ "443", "444", "445", - "446", "447", "448", "449", "450", "451", "452", - "453", "454", - "455", "456", - "457", "458", - "459", "460", "461", "462", @@ -468,7 +396,6 @@ "466", "467", "468", - "469", "470", "471", "472", @@ -487,20 +414,17 @@ "485", "486", "487", - "488", "489", "490", "491", "492", "493", "494", - "495", "496", "497", "498", "499", "500", - "501", "502", "503", "504", @@ -521,17 +445,13 @@ "519", "520", "521", - "522", "523", - "524", "525", "526", "527", "528", "529", - "530", "531", - "532", "533", "534", "535", @@ -550,7 +470,6 @@ "548", "549", "550", - "551", "552", "553", "554", @@ -583,11 +502,8 @@ "581", "582", "583", - "584", "585", - "586", "587", - "588", "589", "590", "591", diff --git a/parser/testdata/parse/postgres_regress/partition_prune.metadata.json b/parser/testdata/parse/postgres_regress/partition_prune.metadata.json index 6644147..fa2aec9 100644 --- a/parser/testdata/parse/postgres_regress/partition_prune.metadata.json +++ b/parser/testdata/parse/postgres_regress/partition_prune.metadata.json @@ -140,14 +140,6 @@ "138", "139", "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", "149", "150", "151", @@ -155,10 +147,6 @@ "153", "154", "155", - "156", - "157", - "158", - "159", "160", "161", "162", @@ -175,20 +163,9 @@ "173", "174", "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", "184", "185", "186", - "187", - "188", - "189", "190", "191", "192", @@ -277,7 +254,6 @@ "275", "276", "277", - "278", "279", "280", "281", @@ -354,12 +330,7 @@ "352", "353", "354", - "355", "356", - "357", - "358", - "359", - "360", "361", "362", "363", @@ -376,13 +347,8 @@ "374", "375", "376", - "377", - "378", "379", - "380", - "381", "382", - "383", "384", "385", "386", @@ -410,11 +376,9 @@ "408", "409", "410", - "411", "412", "413", "414", - "415", "416", "417", "418", @@ -436,21 +400,15 @@ "434", "435", "436", - "437", - "438", "439", "440", "441", - "442", - "443", "444", "445", "446", - "447", "448", "449", "450", - "451", "452", "453", "454", @@ -468,7 +426,6 @@ "466", "467", "468", - "469", "470", "471", "472", @@ -551,7 +508,6 @@ "549", "550", "551", - "552", "553", "554", "555", @@ -623,7 +579,6 @@ "621", "622", "623", - "624", "625", "626", "627", @@ -650,8 +605,6 @@ "648", "649", "650", - "651", - "652", "653", "654", "655", @@ -683,10 +636,7 @@ "681", "682", "683", - "684", "685", - "686", - "687", "688", "689", "690", diff --git a/parser/testdata/parse/postgres_regress/password.metadata.json b/parser/testdata/parse/postgres_regress/password.metadata.json index fbb3e40..97df595 100644 --- a/parser/testdata/parse/postgres_regress/password.metadata.json +++ b/parser/testdata/parse/postgres_regress/password.metadata.json @@ -12,9 +12,7 @@ "010", "011", "012", - "013", "014", - "015", "016", "017", "018", @@ -28,15 +26,12 @@ "026", "027", "028", - "029", "030", "031", "032", - "033", "034", "035", "036", - "037", "038", "039", "040", @@ -49,7 +44,6 @@ "047", "048", "049", - "050", - "051" + "050" ] } diff --git a/parser/testdata/parse/postgres_regress/path.metadata.json b/parser/testdata/parse/postgres_regress/path.metadata.json index 880b1d2..2aa574e 100644 --- a/parser/testdata/parse/postgres_regress/path.metadata.json +++ b/parser/testdata/parse/postgres_regress/path.metadata.json @@ -14,14 +14,6 @@ "012", "013", "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023" + "015" ] } diff --git a/parser/testdata/parse/postgres_regress/pg_lsn.metadata.json b/parser/testdata/parse/postgres_regress/pg_lsn.metadata.json index 442b788..aaf942e 100644 --- a/parser/testdata/parse/postgres_regress/pg_lsn.metadata.json +++ b/parser/testdata/parse/postgres_regress/pg_lsn.metadata.json @@ -8,28 +8,7 @@ "006", "007", "008", - "009", - "010", - "011", "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031" + "030" ] } diff --git a/parser/testdata/parse/postgres_regress/plancache.metadata.json b/parser/testdata/parse/postgres_regress/plancache.metadata.json index ba349a5..842dadd 100644 --- a/parser/testdata/parse/postgres_regress/plancache.metadata.json +++ b/parser/testdata/parse/postgres_regress/plancache.metadata.json @@ -23,16 +23,10 @@ "021", "022", "023", - "024", - "025", - "026", "027", "028", - "029", "030", - "031", "032", - "033", "034", "035", "036", @@ -41,7 +35,6 @@ "039", "040", "041", - "042", "043", "044", "045", @@ -55,8 +48,6 @@ "053", "054", "055", - "056", - "057", "058", "059", "060", @@ -77,25 +68,19 @@ "075", "076", "077", - "078", "079", "080", - "081", "082", "083", - "084", "085", "086", "087", "088", "089", - "090", "091", - "092", "093", "094", "095", - "096", "097" ] } diff --git a/parser/testdata/parse/postgres_regress/plpgsql.metadata.json b/parser/testdata/parse/postgres_regress/plpgsql.metadata.json index 35fd146..be86770 100644 --- a/parser/testdata/parse/postgres_regress/plpgsql.metadata.json +++ b/parser/testdata/parse/postgres_regress/plpgsql.metadata.json @@ -204,24 +204,12 @@ "202", "203", "204", - "205", - "206", "207", - "208", - "209", "210", - "211", - "212", "213", "214", - "215", - "216", "217", - "218", - "219", "220", - "221", - "222", "223", "224", "225", @@ -236,8 +224,6 @@ "234", "235", "236", - "237", - "238", "239", "240", "241", @@ -270,8 +256,6 @@ "268", "269", "270", - "271", - "272", "273", "274", "275", @@ -283,232 +267,140 @@ "281", "282", "283", - "284", "285", "286", - "287", - "288", "289", - "290", "291", - "292", "293", - "294", "295", - "296", - "297", "298", - "299", - "300", "301", - "302", - "303", "304", "305", - "306", "307", "308", - "309", - "310", "311", "312", - "313", - "314", "315", "316", "317", - "318", "319", "320", - "321", "322", "323", - "324", - "325", "326", "327", "328", - "329", "330", "331", - "332", - "333", - "334", - "335", "336", "337", "338", - "339", - "340", "341", - "342", - "343", "344", "345", - "346", "347", "348", - "349", - "350", "351", "352", - "353", "354", "355", - "356", - "357", "358", "359", - "360", - "361", "362", "363", "364", "365", - "366", - "367", "368", "369", "370", "371", - "372", - "373", "374", - "375", - "376", - "377", - "378", - "379", "380", "381", "382", "383", "384", "385", - "386", "387", "388", "389", - "390", "391", - "392", "393", "394", "395", "396", - "397", "398", - "399", "400", - "401", "402", - "403", "404", - "405", "406", "407", "408", "409", "410", - "411", "412", - "413", "414", - "415", "416", "417", "418", - "419", "420", - "421", "422", "423", "424", "425", "426", - "427", "428", - "429", "430", "431", "432", "433", "434", - "435", "436", "437", "438", - "439", "440", - "441", "442", - "443", "444", - "445", "446", "447", "448", "449", "450", - "451", "452", "453", - "454", "455", "456", "457", - "458", "459", - "460", "461", - "462", "463", - "464", - "465", "466", - "467", "468", - "469", "470", - "471", "472", - "473", "474", - "475", "476", - "477", "478", "479", "480", - "481", "482", - "483", "484", - "485", "486", - "487", "488", - "489", "490", - "491", "492", - "493", "494", - "495", "496", "497", - "498", "499", "500", "501", "502", "503", "504", - "505", "506", - "507", "508", - "509", "510", "511", "512", @@ -518,11 +410,9 @@ "516", "517", "518", - "519", "520", "521", "522", - "523", "524", "525", "526", @@ -543,205 +433,124 @@ "541", "542", "543", - "544", "545", - "546", "547", - "548", "549", - "550", "551", - "552", "553", - "554", "555", - "556", "557", "558", - "559", "560", "561", - "562", "563", "564", - "565", "566", - "567", "568", "569", - "570", "571", "572", - "573", "574", "575", - "576", - "577", "578", - "579", - "580", "581", "582", "583", "584", - "585", "586", "587", "588", "589", - "590", "591", - "592", "593", - "594", "595", - "596", "597", "598", "599", "600", - "601", "602", - "603", "604", - "605", "606", - "607", "608", - "609", "610", "611", - "612", "613", - "614", "615", "616", - "617", "618", "619", - "620", "621", - "622", "623", "624", - "625", "626", - "627", "628", "629", "630", - "631", "632", - "633", "634", - "635", "636", - "637", "638", - "639", "640", - "641", "642", - "643", "644", - "645", "646", - "647", "648", - "649", "650", - "651", "652", - "653", "654", "655", "656", - "657", "658", - "659", "660", - "661", "662", "663", "664", "665", - "666", "667", "668", "669", "670", - "671", "672", "673", - "674", "675", "676", - "677", - "678", - "679", "680", "681", - "682", - "683", - "684", - "685", "686", - "687", "688", "689", "690", - "691", "692", - "693", "694", "695", - "696", "697", - "698", "699", - "700", - "701", "702", "703", "704", - "705", - "706", "707", "708", "709", - "710", "711", "712", - "713", "714", "715", "716", - "717", "718", "719", "720", "721", "722", - "723", "724", - "725", "726", "727", "728", "729", "730", "731", - "732", - "733", "734", - "735", - "736", "737", - "738", - "739", "740", - "741", - "742", "743", "744", "745", @@ -750,19 +559,13 @@ "748", "749", "750", - "751", - "752", "753", "754", "755", - "756", "757", - "758", "759", "760", - "761", "762", - "763", "764", "765", "766", @@ -774,87 +577,48 @@ "772", "773", "774", - "775", "776", - "777", "778", - "779", "780", "781", - "782", "783", - "784", "785", - "786", - "787", "788", "789", - "790", - "791", "792", - "793", - "794", "795", - "796", - "797", "798", - "799", - "800", - "801", "802", "803", - "804", - "805", "806", - "807", - "808", "809", - "810", - "811", "812", "813", "814", "815", - "816", - "817", "818", - "819", - "820", "821", - "822", - "823", - "824", - "825", "826", "827", "828", "829", - "830", "831", - "832", "833", - "834", "835", - "836", "837", "838", "839", "840", - "841", - "842", "843", "844", "845", "846", "847", "848", - "849", - "850", "851", "852", "853", "854", - "855", "856", "857", "858", @@ -911,9 +675,7 @@ "909", "910", "911", - "912", "913", - "914", "915", "916", "917", @@ -937,9 +699,7 @@ "935", "936", "937", - "938", "939", - "940", "941" ] } diff --git a/parser/testdata/parse/postgres_regress/point.metadata.json b/parser/testdata/parse/postgres_regress/point.metadata.json index e74143a..a146079 100644 --- a/parser/testdata/parse/postgres_regress/point.metadata.json +++ b/parser/testdata/parse/postgres_regress/point.metadata.json @@ -6,22 +6,6 @@ "004", "005", "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", "023", "024", "025", @@ -29,19 +13,11 @@ "027", "028", "029", - "030", - "031", - "032", "033", "034", "035", - "036", - "037", - "038", "039", "040", - "041", - "042", - "043" + "041" ] } diff --git a/parser/testdata/parse/postgres_regress/polygon.metadata.json b/parser/testdata/parse/postgres_regress/polygon.metadata.json index 7d59f7e..ef55208 100644 --- a/parser/testdata/parse/postgres_regress/polygon.metadata.json +++ b/parser/testdata/parse/postgres_regress/polygon.metadata.json @@ -13,7 +13,6 @@ "011", "012", "013", - "014", "015", "016", "017", @@ -27,40 +26,23 @@ "025", "026", "027", - "028", "029", - "030", "031", - "032", "033", - "034", "035", - "036", "037", - "038", "039", - "040", "041", - "042", "043", - "044", "045", - "046", "047", - "048", "049", - "050", "051", "052", "053", "054", - "055", "056", "057", - "058", - "059", - "060", - "061", - "062" + "058" ] } diff --git a/parser/testdata/parse/postgres_regress/polymorphism.metadata.json b/parser/testdata/parse/postgres_regress/polymorphism.metadata.json index 835764e..13c415d 100644 --- a/parser/testdata/parse/postgres_regress/polymorphism.metadata.json +++ b/parser/testdata/parse/postgres_regress/polymorphism.metadata.json @@ -1,72 +1,41 @@ { "todo": [ "001", - "002", - "003", "004", "005", - "006", "007", "008", - "009", - "010", "011", "012", - "013", - "014", "015", "016", "017", - "018", "019", "020", - "021", "022", "023", - "024", - "025", "026", "027", - "028", - "029", "030", "031", "032", - "033", "034", "035", "036", - "037", "038", "039", - "040", - "041", - "042", - "043", "044", "045", - "046", - "047", "048", "049", - "050", - "051", "052", "053", - "054", - "055", "056", "057", - "058", - "059", "060", "061", - "062", - "063", "064", "065", - "066", - "067", "068", "069", "070", @@ -147,173 +116,55 @@ "145", "146", "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", "172", "173", - "174", - "175", "176", - "177", - "178", "179", "180", - "181", "182", "183", "184", "185", "186", "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", "205", - "206", - "207", - "208", - "209", "210", "211", - "212", - "213", - "214", - "215", - "216", "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", "227", - "228", - "229", - "230", - "231", "232", "233", "234", "235", "236", - "237", "238", "239", - "240", "241", - "242", - "243", - "244", - "245", - "246", "247", "248", "249", "250", - "251", - "252", - "253", - "254", - "255", "256", "257", "258", "259", - "260", - "261", - "262", - "263", "264", "265", - "266", - "267", - "268", "269", - "270", - "271", - "272", "273", "274", "275", "276", "277", - "278", - "279", "280", "281", "282", "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", "297", "298", - "299", - "300", - "301", - "302", - "303", - "304", "305", "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", "315", "316", "317", @@ -322,106 +173,35 @@ "320", "321", "322", - "323", "324", "325", - "326", "327", "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", "357", "358", - "359", "360", "361", "362", - "363", - "364", - "365", - "366", "367", "368", - "369", - "370", - "371", "372", "373", - "374", - "375", - "376", - "377", - "378", - "379", "380", "381", - "382", - "383", - "384", - "385", - "386", "387", "388", - "389", - "390", "391", "392", "393", - "394", - "395", - "396", - "397", - "398", "399", "400", - "401", - "402", "403", "404", "405", - "406", - "407", - "408", "409", "410", - "411", - "412", - "413", - "414", "415", "416", - "417", - "418", - "419", - "420", - "421", - "422", "423" ] } diff --git a/parser/testdata/parse/postgres_regress/portals.metadata.json b/parser/testdata/parse/postgres_regress/portals.metadata.json index f599902..0450592 100644 --- a/parser/testdata/parse/postgres_regress/portals.metadata.json +++ b/parser/testdata/parse/postgres_regress/portals.metadata.json @@ -82,9 +82,7 @@ "080", "081", "082", - "083", "084", - "085", "086", "087", "088", @@ -96,7 +94,6 @@ "094", "095", "096", - "097", "098", "099", "100", @@ -105,7 +102,6 @@ "103", "104", "105", - "106", "107", "108", "109", @@ -115,7 +111,6 @@ "113", "114", "115", - "116", "117", "118", "119", @@ -123,7 +118,6 @@ "121", "122", "123", - "124", "125", "126", "127", @@ -145,75 +139,52 @@ "143", "144", "145", - "146", "147", - "148", "149", "150", "151", - "152", "153", - "154", "155", "156", "157", - "158", "159", - "160", "161", "162", "163", - "164", "165", "166", "167", "168", - "169", "170", "171", "172", "173", - "174", "175", "176", "177", "178", - "179", "180", - "181", "182", "183", "184", "185", - "186", "187", - "188", "189", "190", - "191", "192", - "193", "194", - "195", "196", "197", - "198", "199", "200", "201", "202", - "203", "204", - "205", "206", - "207", "208", - "209", "210", - "211", "212", "213", - "214", "215", "216", "217", @@ -221,11 +192,9 @@ "219", "220", "221", - "222", "223", "224", "225", - "226", "227", "228", "229", @@ -236,7 +205,6 @@ "234", "235", "236", - "237", "238", "239", "240", @@ -251,7 +219,6 @@ "249", "250", "251", - "252", "253", "254", "255", @@ -291,7 +258,6 @@ "289", "290", "291", - "292", "293", "294", "295", @@ -306,7 +272,6 @@ "304", "305", "306", - "307", "308", "309", "310", diff --git a/parser/testdata/parse/postgres_regress/predicate.metadata.json b/parser/testdata/parse/postgres_regress/predicate.metadata.json index 6e8763d..3a967e4 100644 --- a/parser/testdata/parse/postgres_regress/predicate.metadata.json +++ b/parser/testdata/parse/postgres_regress/predicate.metadata.json @@ -37,9 +37,7 @@ "035", "036", "037", - "038", "039", - "040", "041", "042" ] diff --git a/parser/testdata/parse/postgres_regress/prepare.metadata.json b/parser/testdata/parse/postgres_regress/prepare.metadata.json index daef5f1..5e73844 100644 --- a/parser/testdata/parse/postgres_regress/prepare.metadata.json +++ b/parser/testdata/parse/postgres_regress/prepare.metadata.json @@ -1,19 +1,14 @@ { "todo": [ - "001", "002", "003", - "004", "005", "006", "007", "008", "009", - "010", "011", - "012", "013", - "014", "015", "016", "017", @@ -24,14 +19,10 @@ "022", "023", "024", - "025", "026", - "027", "028", "029", "030", - "031", - "032", - "033" + "032" ] } diff --git a/parser/testdata/parse/postgres_regress/prepared_xacts.metadata.json b/parser/testdata/parse/postgres_regress/prepared_xacts.metadata.json index 449cbc1..cb68778 100644 --- a/parser/testdata/parse/postgres_regress/prepared_xacts.metadata.json +++ b/parser/testdata/parse/postgres_regress/prepared_xacts.metadata.json @@ -4,47 +4,28 @@ "002", "003", "004", - "005", "006", - "007", - "008", "009", - "010", - "011", "012", "013", - "014", "015", - "016", "017", - "018", "019", "020", - "021", "022", - "023", "024", "025", "026", - "027", "028", - "029", "030", "031", - "032", "033", - "034", "035", - "036", "037", "038", - "039", "040", - "041", "042", "043", - "044", - "045", "046", "047", "048", @@ -65,21 +46,14 @@ "063", "064", "065", - "066", - "067", "068", "069", "070", - "071", "072", "073", "074", "075", - "076", - "077", "078", - "079", - "080", "081", "082", "083" diff --git a/parser/testdata/parse/postgres_regress/privileges.metadata.json b/parser/testdata/parse/postgres_regress/privileges.metadata.json index 302fef8..bc5e1f7 100644 --- a/parser/testdata/parse/postgres_regress/privileges.metadata.json +++ b/parser/testdata/parse/postgres_regress/privileges.metadata.json @@ -10,7 +10,6 @@ "008", "009", "010", - "011", "012", "013", "014", @@ -29,18 +28,14 @@ "027", "028", "029", - "030", "031", "032", - "033", "034", "035", - "036", "037", "038", "039", "040", - "041", "042", "043", "044", @@ -95,25 +90,17 @@ "093", "094", "095", - "096", "097", - "098", "099", "100", "101", - "102", "103", - "104", "105", "106", - "107", "108", - "109", "110", "111", - "112", "113", - "114", "115", "116", "117", @@ -145,9 +132,7 @@ "143", "144", "145", - "146", "147", - "148", "149", "150", "151", @@ -156,10 +141,8 @@ "154", "155", "156", - "157", "158", "159", - "160", "161", "162", "163", @@ -167,16 +150,11 @@ "165", "166", "167", - "168", - "169", - "170", "171", "172", "173", "174", "175", - "176", - "177", "178", "179", "180", @@ -184,8 +162,6 @@ "182", "183", "184", - "185", - "186", "187", "188", "189", @@ -224,7 +200,6 @@ "222", "223", "224", - "225", "226", "227", "228", @@ -248,27 +223,14 @@ "246", "247", "248", - "249", - "250", "251", "252", "253", - "254", - "255", - "256", - "257", - "258", "259", - "260", "261", "262", - "263", "264", "265", - "266", - "267", - "268", - "269", "270", "271", "272", @@ -276,56 +238,18 @@ "274", "275", "276", - "277", - "278", "279", - "280", "281", - "282", "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", "315", "316", "317", - "318", "319", "320", "321", - "322", "323", "324", "325", - "326", "327", "328", "329", diff --git a/parser/testdata/parse/postgres_regress/psql.metadata.json b/parser/testdata/parse/postgres_regress/psql.metadata.json index 0612d4a..e83fbdb 100644 --- a/parser/testdata/parse/postgres_regress/psql.metadata.json +++ b/parser/testdata/parse/postgres_regress/psql.metadata.json @@ -1,41 +1,12 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", "025", "026", - "027", - "028", "029", - "030", - "031", "032", "033", "034", "035", - "036", "037", "038", "039", @@ -121,7 +92,6 @@ "119", "120", "121", - "122", "123", "124", "125", @@ -137,7 +107,6 @@ "135", "136", "137", - "138", "139", "140", "141", @@ -150,10 +119,6 @@ "148", "149", "150", - "151", - "152", - "153", - "154", "155", "156", "157", @@ -192,9 +157,6 @@ "190", "191", "192", - "193", - "194", - "195", - "196" + "193" ] } diff --git a/parser/testdata/parse/postgres_regress/psql_crosstab.metadata.json b/parser/testdata/parse/postgres_regress/psql_crosstab.metadata.json index 5e6664a..4ec0128 100644 --- a/parser/testdata/parse/postgres_regress/psql_crosstab.metadata.json +++ b/parser/testdata/parse/postgres_regress/psql_crosstab.metadata.json @@ -2,11 +2,7 @@ "todo": [ "001", "002", - "003", - "004", "005", - "006", - "007", - "008" + "006" ] } diff --git a/parser/testdata/parse/postgres_regress/publication.metadata.json b/parser/testdata/parse/postgres_regress/publication.metadata.json index 8cf9d31..242cb20 100644 --- a/parser/testdata/parse/postgres_regress/publication.metadata.json +++ b/parser/testdata/parse/postgres_regress/publication.metadata.json @@ -8,7 +8,6 @@ "006", "007", "008", - "009", "010", "011", "012", @@ -49,7 +48,6 @@ "047", "048", "049", - "050", "051", "052", "053", @@ -589,20 +587,14 @@ "587", "588", "589", - "590", "591", "592", - "593", "594", - "595", "596", "597", - "598", "599", "600", - "601", "602", - "603", "604", "605", "606", @@ -612,7 +604,6 @@ "610", "611", "612", - "613", "614", "615", "616", diff --git a/parser/testdata/parse/postgres_regress/random.metadata.json b/parser/testdata/parse/postgres_regress/random.metadata.json index 634de79..0f371cb 100644 --- a/parser/testdata/parse/postgres_regress/random.metadata.json +++ b/parser/testdata/parse/postgres_regress/random.metadata.json @@ -1,52 +1,10 @@ { "todo": [ - "001", - "002", "003", - "004", - "005", - "006", - "007", "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", "031", - "032", "033", - "034", "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048" + "039" ] } diff --git a/parser/testdata/parse/postgres_regress/rangefuncs.metadata.json b/parser/testdata/parse/postgres_regress/rangefuncs.metadata.json index 526d3ef..fbec2bd 100644 --- a/parser/testdata/parse/postgres_regress/rangefuncs.metadata.json +++ b/parser/testdata/parse/postgres_regress/rangefuncs.metadata.json @@ -5,38 +5,15 @@ "003", "004", "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", "014", - "015", - "016", "017", - "018", "019", - "020", - "021", "022", - "023", - "024", - "025", - "026", "027", - "028", - "029", "030", "031", - "032", - "033", "034", "035", - "036", - "037", "038", "039", "040", @@ -54,102 +31,56 @@ "052", "053", "054", - "055", - "056", - "057", - "058", - "059", - "060", "061", "062", "063", "064", "065", - "066", - "067", "068", - "069", "070", "071", - "072", "073", "074", - "075", - "076", "077", - "078", "079", "080", - "081", "082", "083", - "084", - "085", "086", - "087", "088", "089", - "090", "091", "092", - "093", - "094", "095", - "096", "097", "098", - "099", "100", "101", - "102", - "103", "104", - "105", "106", "107", - "108", "109", "110", - "111", - "112", "113", - "114", "115", "116", - "117", "118", "119", - "120", - "121", "122", - "123", "124", "125", - "126", "127", "128", - "129", - "130", "131", - "132", "133", "134", - "135", "136", "137", - "138", - "139", "140", - "141", "142", "143", - "144", "145", - "146", - "147", "148", - "149", - "150", "151", "152", "153", @@ -168,265 +99,113 @@ "166", "167", "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", "224", "225", "226", "227", "228", - "229", - "230", - "231", "232", "233", "234", "235", "236", - "237", - "238", - "239", "240", - "241", - "242", - "243", "244", "245", "246", "247", - "248", - "249", - "250", - "251", "252", "253", "254", - "255", "256", "257", "258", - "259", - "260", - "261", - "262", "263", "264", - "265", - "266", - "267", "268", "269", "270", - "271", "272", "273", - "274", "275", "276", - "277", "278", "279", "280", - "281", - "282", - "283", "284", - "285", - "286", "287", - "288", - "289", - "290", - "291", - "292", "293", "294", - "295", - "296", "297", "298", - "299", - "300", - "301", "302", "303", - "304", "305", - "306", "307", "308", - "309", - "310", - "311", - "312", - "313", "314", "315", - "316", - "317", - "318", - "319", "320", "321", "322", - "323", - "324", - "325", "326", "327", - "328", - "329", - "330", "331", "332", "333", "334", - "335", "336", - "337", "338", "339", - "340", "341", - "342", "343", "344", "345", - "346", "347", - "348", "349", "350", - "351", "352", - "353", "354", "355", - "356", "357", - "358", - "359", - "360", - "361", "362", "363", "364", "365", "366", "367", - "368", - "369", "370", - "371", - "372", - "373", - "374", - "375", "376", - "377", "378", - "379", "380", "381", "382", "383", - "384", "385", "386", "387", "388", "389", - "390", "391", "392", "393", "394", "395", "396", - "397", - "398", "399", "400", "401", - "402", "403", - "404", "405", - "406", "407", "408", "409", - "410", "411", "412", - "413", "414", "415", - "416", "417", - "418", - "419", - "420", - "421", "422", - "423", - "424", - "425", - "426", - "427", - "428" + "423" ] } diff --git a/parser/testdata/parse/postgres_regress/rangetypes.metadata.json b/parser/testdata/parse/postgres_regress/rangetypes.metadata.json index fa6f7df..104b351 100644 --- a/parser/testdata/parse/postgres_regress/rangetypes.metadata.json +++ b/parser/testdata/parse/postgres_regress/rangetypes.metadata.json @@ -1,46 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", "042", "043", "044", @@ -49,59 +8,6 @@ "047", "048", "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", "103", "104", "105", @@ -110,21 +16,15 @@ "108", "109", "110", - "111", - "112", - "113", "114", "115", "116", - "117", "118", "119", "120", - "121", "122", "123", "124", - "125", "126", "127", "128", @@ -137,31 +37,6 @@ "135", "136", "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", "163", "164", "165", @@ -175,71 +50,11 @@ "173", "174", "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", "196", "197", "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", "219", "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", "241", "242", "243", @@ -252,46 +67,12 @@ "250", "251", "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", "264", "265", "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", "278", "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", "291", - "292", "293", "294", "295", @@ -299,10 +80,8 @@ "297", "298", "299", - "300", "301", "302", - "303", "304", "305", "306", @@ -311,79 +90,47 @@ "309", "310", "311", - "312", "313", - "314", - "315", "316", "317", - "318", "319", "320", - "321", "322", "323", "324", - "325", "326", "327", "328", - "329", - "330", "331", "332", "333", - "334", - "335", "336", "337", "338", - "339", - "340", "341", "342", "343", "344", - "345", - "346", "347", - "348", - "349", "350", - "351", - "352", - "353", "354", "355", - "356", "357", "358", - "359", "360", "361", - "362", - "363", - "364", - "365", "366", "367", - "368", "369", "370", "371", "372", - "373", "374", "375", - "376", "377", - "378", "379", - "380", "381", - "382", "383", - "384", "385", "386", "387", @@ -404,7 +151,6 @@ "402", "403", "404", - "405", "406", "407" ] diff --git a/parser/testdata/parse/postgres_regress/regex.metadata.json b/parser/testdata/parse/postgres_regress/regex.metadata.json index 60e76e3..7727796 100644 --- a/parser/testdata/parse/postgres_regress/regex.metadata.json +++ b/parser/testdata/parse/postgres_regress/regex.metadata.json @@ -1,54 +1,6 @@ { "todo": [ "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", "050", "051", "052", @@ -57,53 +9,6 @@ "055", "056", "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105" + "058" ] } diff --git a/parser/testdata/parse/postgres_regress/regproc.metadata.json b/parser/testdata/parse/postgres_regress/regproc.metadata.json index 60e76e3..6120e61 100644 --- a/parser/testdata/parse/postgres_regress/regproc.metadata.json +++ b/parser/testdata/parse/postgres_regress/regproc.metadata.json @@ -1,109 +1,6 @@ { "todo": [ "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105" + "037" ] } diff --git a/parser/testdata/parse/postgres_regress/reloptions.metadata.json b/parser/testdata/parse/postgres_regress/reloptions.metadata.json index 7a82cd3..69d9ea7 100644 --- a/parser/testdata/parse/postgres_regress/reloptions.metadata.json +++ b/parser/testdata/parse/postgres_regress/reloptions.metadata.json @@ -1,7 +1,6 @@ { "todo": [ "001", - "002", "003", "004", "005", @@ -19,52 +18,33 @@ "017", "018", "019", - "020", "021", - "022", "023", - "024", "025", - "026", "027", "028", "029", - "030", "031", "032", - "033", "034", "035", - "036", - "037", "038", - "039", "040", "041", - "042", "043", "044", - "045", - "046", "047", - "048", "049", - "050", "051", "052", "053", - "054", - "055", "056", - "057", "058", "059", "060", "061", "062", - "063", "064", - "065", - "066" + "065" ] } diff --git a/parser/testdata/parse/postgres_regress/replica_identity.metadata.json b/parser/testdata/parse/postgres_regress/replica_identity.metadata.json index dc9d431..1a54433 100644 --- a/parser/testdata/parse/postgres_regress/replica_identity.metadata.json +++ b/parser/testdata/parse/postgres_regress/replica_identity.metadata.json @@ -9,9 +9,6 @@ "007", "008", "009", - "010", - "011", - "012", "013", "014", "015", @@ -20,21 +17,13 @@ "018", "019", "020", - "021", "022", - "023", "024", "025", "026", - "027", - "028", "029", - "030", - "031", "032", - "033", "034", - "035", "036", "037", "038", diff --git a/parser/testdata/parse/postgres_regress/returning.metadata.json b/parser/testdata/parse/postgres_regress/returning.metadata.json index 2be5689..b21e11e 100644 --- a/parser/testdata/parse/postgres_regress/returning.metadata.json +++ b/parser/testdata/parse/postgres_regress/returning.metadata.json @@ -2,32 +2,19 @@ "todo": [ "001", "002", - "003", "004", - "005", "006", - "007", "008", "009", "010", "011", - "012", "013", - "014", "015", "016", "017", - "018", - "019", "020", - "021", - "022", "023", - "024", - "025", "026", - "027", - "028", "029", "030", "031", @@ -37,29 +24,20 @@ "035", "036", "037", - "038", - "039", "040", "041", "042", - "043", - "044", "045", "046", "047", - "048", - "049", "050", "051", - "052", "053", "054", - "055", "056", "057", "058", "059", - "060", "061", "062", "063", @@ -67,12 +45,8 @@ "065", "066", "067", - "068", "069", "070", - "071", - "072", - "073", "074", "075", "076", diff --git a/parser/testdata/parse/postgres_regress/roleattributes.metadata.json b/parser/testdata/parse/postgres_regress/roleattributes.metadata.json index fb87925..9e54757 100644 --- a/parser/testdata/parse/postgres_regress/roleattributes.metadata.json +++ b/parser/testdata/parse/postgres_regress/roleattributes.metadata.json @@ -1,69 +1,37 @@ { "todo": [ "001", - "002", "003", - "004", "005", - "006", "007", - "008", "009", - "010", "011", - "012", "013", - "014", "015", - "016", "017", - "018", "019", - "020", "021", - "022", "023", - "024", "025", - "026", "027", - "028", "029", - "030", "031", - "032", "033", - "034", "035", - "036", "037", - "038", "039", - "040", "041", - "042", "043", - "044", "045", - "046", "047", - "048", "049", - "050", "051", - "052", "053", - "054", "055", - "056", "057", - "058", "059", - "060", "061", - "062", "063", - "064", "065", "066", "067", diff --git a/parser/testdata/parse/postgres_regress/rowsecurity.metadata.json b/parser/testdata/parse/postgres_regress/rowsecurity.metadata.json index dcaa437..e8626c7 100644 --- a/parser/testdata/parse/postgres_regress/rowsecurity.metadata.json +++ b/parser/testdata/parse/postgres_regress/rowsecurity.metadata.json @@ -39,21 +39,12 @@ "037", "038", "039", - "040", "041", "042", - "043", - "044", - "045", "046", - "047", - "048", - "049", "050", "051", "052", - "053", - "054", "055", "056", "057", @@ -63,47 +54,30 @@ "061", "062", "063", - "064", - "065", "066", - "067", - "068", "069", "070", "071", "072", "073", "074", - "075", "076", "077", - "078", "079", "080", "081", - "082", "083", "084", "085", "086", - "087", - "088", "089", "090", - "091", - "092", "093", "094", - "095", - "096", "097", "098", - "099", - "100", "101", "102", - "103", - "104", "105", "106", "107", @@ -122,27 +96,18 @@ "120", "121", "122", - "123", "124", - "125", "126", - "127", "128", - "129", "130", - "131", "132", - "133", "134", - "135", "136", "137", "138", - "139", "140", "141", "142", - "143", "144", "145", "146", @@ -157,59 +122,40 @@ "155", "156", "157", - "158", "159", "160", - "161", "162", "163", - "164", "165", "166", - "167", "168", "169", "170", "171", "172", - "173", - "174", "175", "176", "177", "178", "179", - "180", - "181", "182", "183", - "184", "185", "186", "187", "188", "189", "190", - "191", "192", - "193", "194", "195", "196", - "197", - "198", "199", "200", - "201", - "202", "203", "204", - "205", - "206", "207", "208", - "209", - "210", "211", "212", "213", @@ -228,14 +174,12 @@ "226", "227", "228", - "229", "230", "231", "232", "233", "234", "235", - "236", "237", "238", "239", @@ -243,7 +187,6 @@ "241", "242", "243", - "244", "245", "246", "247", @@ -252,7 +195,6 @@ "250", "251", "252", - "253", "254", "255", "256", @@ -266,31 +208,25 @@ "264", "265", "266", - "267", "268", "269", "270", "271", "272", - "273", "274", "275", "276", "277", - "278", "279", - "280", "281", "282", "283", "284", - "285", "286", "287", "288", "289", "290", - "291", "292", "293", "294", @@ -321,7 +257,6 @@ "319", "320", "321", - "322", "323", "324", "325", @@ -339,7 +274,6 @@ "337", "338", "339", - "340", "341", "342", "343", @@ -348,7 +282,6 @@ "346", "347", "348", - "349", "350", "351", "352", @@ -356,7 +289,6 @@ "354", "355", "356", - "357", "358", "359", "360", @@ -388,7 +320,6 @@ "386", "387", "388", - "389", "390", "391", "392", @@ -398,7 +329,6 @@ "396", "397", "398", - "399", "400", "401", "402", @@ -415,12 +345,10 @@ "413", "414", "415", - "416", "417", "418", "419", "420", - "421", "422", "423", "424", @@ -430,7 +358,6 @@ "428", "429", "430", - "431", "432", "433", "434", @@ -439,19 +366,16 @@ "437", "438", "439", - "440", "441", "442", "443", "444", "445", - "446", "447", "448", "449", "450", "451", - "452", "453", "454", "455", @@ -460,46 +384,36 @@ "458", "459", "460", - "461", "462", "463", - "464", "465", "466", "467", "468", "469", "470", - "471", "472", "473", - "474", "475", "476", - "477", "478", "479", "480", "481", - "482", "483", "484", "485", "486", "487", "488", - "489", "490", "491", - "492", "493", "494", "495", "496", - "497", "498", "499", - "500", "501", "502", "503", @@ -510,13 +424,10 @@ "508", "509", "510", - "511", "512", "513", - "514", "515", "516", - "517", "518", "519", "520", @@ -525,34 +436,26 @@ "523", "524", "525", - "526", "527", "528", - "529", "530", "531", - "532", "533", "534", "535", "536", - "537", "538", "539", - "540", "541", "542", "543", "544", - "545", "546", "547", - "548", "549", "550", "551", "552", - "553", "554", "555", "556", @@ -567,10 +470,8 @@ "565", "566", "567", - "568", "569", "570", - "571", "572", "573", "574", @@ -596,15 +497,11 @@ "594", "595", "596", - "597", "598", - "599", "600", "601", "602", - "603", "604", - "605", "606", "607", "608", @@ -629,7 +526,6 @@ "627", "628", "629", - "630", "631", "632", "633", @@ -637,19 +533,13 @@ "635", "636", "637", - "638", "639", - "640", "641", "642", "643", "644", - "645", "646", "647", - "648", - "649", - "650", "651", "652", "653", @@ -659,31 +549,23 @@ "657", "658", "659", - "660", - "661", "662", "663", "664", "665", - "666", - "667", "668", "669", "670", "671", "672", "673", - "674", "675", "676", - "677", "678", "679", "680", - "681", "682", "683", - "684", "685", "686", "687", @@ -766,7 +648,6 @@ "764", "765", "766", - "767", "768", "769", "770", diff --git a/parser/testdata/parse/postgres_regress/rowtypes.metadata.json b/parser/testdata/parse/postgres_regress/rowtypes.metadata.json index e9da7a5..490a0ee 100644 --- a/parser/testdata/parse/postgres_regress/rowtypes.metadata.json +++ b/parser/testdata/parse/postgres_regress/rowtypes.metadata.json @@ -3,71 +3,25 @@ "001", "002", "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", "020", "021", "022", - "023", - "024", - "025", "026", "027", - "028", "029", "030", - "031", "032", - "033", "034", "035", "036", - "037", "038", "039", "040", - "041", "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", "061", - "062", "063", - "064", "065", - "066", "067", - "068", "069", "070", "071", @@ -75,90 +29,23 @@ "073", "074", "075", - "076", "077", - "078", "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", "094", "095", "096", "097", - "098", "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", "113", - "114", - "115", "116", - "117", - "118", "119", - "120", - "121", "122", "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", "137", - "138", - "139", - "140", - "141", "142", - "143", - "144", - "145", - "146", "147", - "148", - "149", - "150", - "151", "152", - "153", - "154", "155", - "156", - "157", - "158", - "159", "160", "161", "162", @@ -168,61 +55,25 @@ "166", "167", "168", - "169", "170", "171", "172", "173", "174", "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", "188", - "189", - "190", "191", - "192", - "193", "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", "205", - "206", - "207", - "208", "209", "210", "211", - "212", "213", "214", - "215", "216", - "217", "218", - "219", "220", - "221", "222", - "223", "224", "225", "226", @@ -230,12 +81,6 @@ "228", "229", "230", - "231", - "232", - "233", - "234", - "235", - "236", "237" ] } diff --git a/parser/testdata/parse/postgres_regress/rules.metadata.json b/parser/testdata/parse/postgres_regress/rules.metadata.json index 75d8f0c..56afadf 100644 --- a/parser/testdata/parse/postgres_regress/rules.metadata.json +++ b/parser/testdata/parse/postgres_regress/rules.metadata.json @@ -59,46 +59,27 @@ "057", "058", "059", - "060", "061", - "062", "063", "064", - "065", "066", "067", - "068", - "069", - "070", "071", "072", - "073", "074", "075", - "076", "077", - "078", - "079", "080", "081", - "082", "083", - "084", "085", - "086", "087", - "088", "089", "090", - "091", "092", - "093", "094", - "095", "096", - "097", "098", - "099", "100", "101", "102", @@ -112,30 +93,21 @@ "110", "111", "112", - "113", - "114", "115", - "116", "117", - "118", - "119", "120", "121", "122", "123", "124", "125", - "126", "127", "128", "129", "130", - "131", "132", "133", - "134", "135", - "136", "137", "138", "139", @@ -146,11 +118,6 @@ "144", "145", "146", - "147", - "148", - "149", - "150", - "151", "152", "153", "154", @@ -167,25 +134,9 @@ "165", "166", "167", - "168", - "169", - "170", - "171", - "172", "173", - "174", - "175", - "176", - "177", - "178", "179", - "180", - "181", - "182", - "183", - "184", "185", - "186", "187", "188", "189", @@ -197,13 +148,10 @@ "195", "196", "197", - "198", "199", "200", "201", "202", - "203", - "204", "205", "206", "207", @@ -219,15 +167,12 @@ "217", "218", "219", - "220", "221", "222", "223", "224", "225", "226", - "227", - "228", "229", "230", "231", @@ -254,25 +199,15 @@ "252", "253", "254", - "255", - "256", - "257", - "258", - "259", "260", - "261", "262", "263", - "264", "265", "266", - "267", "268", "269", - "270", "271", "272", - "273", "274", "275", "276", @@ -286,8 +221,6 @@ "284", "285", "286", - "287", - "288", "289", "290", "291", @@ -309,12 +242,9 @@ "307", "308", "309", - "310", - "311", "312", "313", "314", - "315", "316", "317", "318", @@ -324,34 +254,23 @@ "322", "323", "324", - "325", "326", - "327", - "328", "329", "330", "331", "332", "333", - "334", - "335", "336", - "337", - "338", - "339", "340", "341", "342", "343", "344", - "345", "346", "347", "348", "349", "350", - "351", - "352", "353", "354", "355", @@ -362,27 +281,19 @@ "360", "361", "362", - "363", "364", - "365", "366", - "367", "368", - "369", - "370", "371", "372", "373", "374", - "375", - "376", "377", "378", "379", "380", "381", "382", - "383", "384", "385", "386", @@ -429,11 +340,9 @@ "427", "428", "429", - "430", "431", "432", "433", - "434", "435", "436", "437", @@ -445,9 +354,6 @@ "443", "444", "445", - "446", - "447", - "448", "449", "450", "451", @@ -457,23 +363,16 @@ "455", "456", "457", - "458", - "459", - "460", "461", "462", "463", "464", "465", "466", - "467", - "468", "469", "470", "471", "472", - "473", - "474", "475", "476", "477", @@ -488,14 +387,12 @@ "486", "487", "488", - "489", "490", "491", "492", "493", "494", "495", - "496", "497", "498", "499", @@ -514,46 +411,23 @@ "512", "513", "514", - "515", "516", "517", - "518", "519", "520", - "521", "522", "523", "524", - "525", "526", - "527", "528", - "529", "530", - "531", - "532", "533", "534", "535", - "536", "537", "538", "539", "540", - "541", - "542", - "543", - "544", - "545", - "546", - "547", - "548", - "549", - "550", - "551", - "552", - "553", - "554", "555", "556", "557", @@ -591,8 +465,6 @@ "589", "590", "591", - "592", - "593", "594", "595", "596", @@ -612,8 +484,6 @@ "610", "611", "612", - "613", - "614", "615", "616", "617", diff --git a/parser/testdata/parse/postgres_regress/sanity_check.metadata.json b/parser/testdata/parse/postgres_regress/sanity_check.metadata.json index 3e33966..f23fe5c 100644 --- a/parser/testdata/parse/postgres_regress/sanity_check.metadata.json +++ b/parser/testdata/parse/postgres_regress/sanity_check.metadata.json @@ -1,7 +1,5 @@ { "todo": [ - "001", - "002", - "003" + "001" ] } diff --git a/parser/testdata/parse/postgres_regress/select.metadata.json b/parser/testdata/parse/postgres_regress/select.metadata.json index 8e8d1f7..9abc3eb 100644 --- a/parser/testdata/parse/postgres_regress/select.metadata.json +++ b/parser/testdata/parse/postgres_regress/select.metadata.json @@ -1,88 +1,36 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", "008", "009", "010", "011", - "012", - "013", - "014", "015", "016", "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", "028", "029", - "030", "031", "032", - "033", - "034", - "035", - "036", - "037", "038", "039", - "040", - "041", - "042", - "043", "044", "045", - "046", - "047", - "048", - "049", "050", "051", - "052", - "053", - "054", - "055", "056", - "057", "058", "059", - "060", "061", - "062", "063", - "064", "065", - "066", "067", - "068", "069", "070", - "071", "072", "073", - "074", "075", - "076", - "077", "078", - "079", - "080", "081", - "082", - "083", "084", "085", "086", diff --git a/parser/testdata/parse/postgres_regress/select_distinct.metadata.json b/parser/testdata/parse/postgres_regress/select_distinct.metadata.json index f476ef8..f744f09 100644 --- a/parser/testdata/parse/postgres_regress/select_distinct.metadata.json +++ b/parser/testdata/parse/postgres_regress/select_distinct.metadata.json @@ -1,12 +1,6 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", "006", - "007", "008", "009", "010", @@ -26,8 +20,6 @@ "024", "025", "026", - "027", - "028", "029", "030", "031", @@ -37,7 +29,6 @@ "035", "036", "037", - "038", "039", "040", "041", @@ -47,11 +38,8 @@ "045", "046", "047", - "048", "049", - "050", "051", - "052", "053", "054", "055", @@ -63,18 +51,6 @@ "061", "062", "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076" + "064" ] } diff --git a/parser/testdata/parse/postgres_regress/select_distinct_on.metadata.json b/parser/testdata/parse/postgres_regress/select_distinct_on.metadata.json index 5e6664a..da6f0cc 100644 --- a/parser/testdata/parse/postgres_regress/select_distinct_on.metadata.json +++ b/parser/testdata/parse/postgres_regress/select_distinct_on.metadata.json @@ -1,11 +1,6 @@ { "todo": [ - "001", - "002", - "003", - "004", "005", - "006", "007", "008" ] diff --git a/parser/testdata/parse/postgres_regress/select_having.metadata.json b/parser/testdata/parse/postgres_regress/select_having.metadata.json index 880b1d2..afa22da 100644 --- a/parser/testdata/parse/postgres_regress/select_having.metadata.json +++ b/parser/testdata/parse/postgres_regress/select_having.metadata.json @@ -11,17 +11,6 @@ "009", "010", "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", "023" ] } diff --git a/parser/testdata/parse/postgres_regress/select_implicit.metadata.json b/parser/testdata/parse/postgres_regress/select_implicit.metadata.json index c30fd55..52dc1f4 100644 --- a/parser/testdata/parse/postgres_regress/select_implicit.metadata.json +++ b/parser/testdata/parse/postgres_regress/select_implicit.metadata.json @@ -11,36 +11,8 @@ "009", "010", "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", "040", - "041", "042", "043", "044" diff --git a/parser/testdata/parse/postgres_regress/select_into.metadata.json b/parser/testdata/parse/postgres_regress/select_into.metadata.json index 0a7b0c8..d2164bf 100644 --- a/parser/testdata/parse/postgres_regress/select_into.metadata.json +++ b/parser/testdata/parse/postgres_regress/select_into.metadata.json @@ -1,8 +1,6 @@ { "todo": [ - "001", "002", - "003", "004", "005", "006", @@ -34,24 +32,17 @@ "032", "033", "034", - "035", - "036", - "037", - "038", "039", "040", "041", "042", "043", "044", - "045", - "046", "047", "048", "049", "050", "051", - "052", "053", "054", "055", diff --git a/parser/testdata/parse/postgres_regress/select_parallel.metadata.json b/parser/testdata/parse/postgres_regress/select_parallel.metadata.json index 60ff1c2..014db35 100644 --- a/parser/testdata/parse/postgres_regress/select_parallel.metadata.json +++ b/parser/testdata/parse/postgres_regress/select_parallel.metadata.json @@ -7,17 +7,14 @@ "005", "006", "007", - "008", "009", "010", "011", - "012", "013", "014", "015", "016", "017", - "018", "019", "020", "021", @@ -26,10 +23,8 @@ "024", "025", "026", - "027", "028", "029", - "030", "031", "032", "033", @@ -37,16 +32,13 @@ "035", "036", "037", - "038", "039", "040", - "041", "042", "043", "044", "045", "046", - "047", "048", "049", "050", @@ -55,7 +47,6 @@ "053", "054", "055", - "056", "057", "058", "059", @@ -63,7 +54,6 @@ "061", "062", "063", - "064", "065", "066", "067", @@ -72,23 +62,17 @@ "070", "071", "072", - "073", "074", - "075", "076", - "077", "078", "079", - "080", "081", - "082", "083", "084", "085", "086", "087", "088", - "089", "090", "091", "092", @@ -103,18 +87,15 @@ "101", "102", "103", - "104", "105", "106", "107", - "108", "109", "110", "111", "112", "113", "114", - "115", "116", "117", "118", @@ -125,36 +106,27 @@ "123", "124", "125", - "126", "127", "128", "129", "130", - "131", "132", "133", "134", "135", - "136", "137", "138", - "139", "140", "141", "142", - "143", "144", "145", "146", - "147", "148", - "149", "150", "151", - "152", "153", "154", - "155", "156", "157", "158", @@ -173,7 +145,6 @@ "171", "172", "173", - "174", "175", "176", "177", @@ -182,7 +153,6 @@ "180", "181", "182", - "183", "184", "185", "186", @@ -193,14 +163,12 @@ "191", "192", "193", - "194", "195", "196", "197", "198", "199", "200", - "201", "202", "203", "204", @@ -217,11 +185,7 @@ "215", "216", "217", - "218", - "219", "220", - "221", - "222", "223", "224", "225", diff --git a/parser/testdata/parse/postgres_regress/select_views.metadata.json b/parser/testdata/parse/postgres_regress/select_views.metadata.json index f37dd99..772a280 100644 --- a/parser/testdata/parse/postgres_regress/select_views.metadata.json +++ b/parser/testdata/parse/postgres_regress/select_views.metadata.json @@ -1,8 +1,5 @@ { "todo": [ - "001", - "002", - "003", "004", "005", "006", @@ -24,21 +21,13 @@ "022", "023", "024", - "025", "026", - "027", "028", - "029", "030", - "031", "032", - "033", "034", - "035", "036", - "037", "038", - "039", "040", "041", "042", diff --git a/parser/testdata/parse/postgres_regress/sequence.metadata.json b/parser/testdata/parse/postgres_regress/sequence.metadata.json index 38ac4c2..27232a8 100644 --- a/parser/testdata/parse/postgres_regress/sequence.metadata.json +++ b/parser/testdata/parse/postgres_regress/sequence.metadata.json @@ -41,8 +41,6 @@ "039", "040", "041", - "042", - "043", "044", "045", "046", @@ -54,39 +52,15 @@ "052", "053", "054", - "055", - "056", - "057", - "058", - "059", - "060", "061", "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", "075", - "076", "077", "078", "079", - "080", - "081", - "082", - "083", "084", "085", "086", - "087", "088", "089", "090", @@ -100,71 +74,30 @@ "098", "099", "100", - "101", - "102", "103", - "104", "105", "106", "107", - "108", - "109", - "110", - "111", - "112", "113", - "114", - "115", - "116", - "117", - "118", "119", - "120", - "121", - "122", - "123", - "124", "125", - "126", - "127", - "128", - "129", - "130", "131", - "132", - "133", - "134", "135", - "136", - "137", - "138", "139", "140", "141", "142", - "143", - "144", - "145", - "146", "147", - "148", "149", - "150", - "151", "152", - "153", "154", "155", "156", "157", "158", "159", - "160", - "161", "162", "163", - "164", - "165", "166", "167", "168", @@ -172,93 +105,71 @@ "170", "171", "172", - "173", "174", "175", "176", "177", "178", "179", - "180", "181", "182", "183", "184", "185", "186", - "187", "188", "189", "190", "191", - "192", "193", "194", - "195", "196", "197", "198", "199", - "200", "201", "202", - "203", "204", "205", "206", "207", - "208", "209", "210", - "211", "212", "213", "214", "215", - "216", "217", "218", - "219", "220", "221", "222", "223", - "224", "225", "226", - "227", "228", "229", "230", "231", - "232", "233", "234", - "235", "236", "237", "238", "239", "240", "241", - "242", "243", "244", - "245", - "246", "247", "248", "249", "250", "251", "252", - "253", "254", "255", "256", - "257", - "258", - "259", "260" ] } diff --git a/parser/testdata/parse/postgres_regress/spgist.metadata.json b/parser/testdata/parse/postgres_regress/spgist.metadata.json index 442b788..60ac70c 100644 --- a/parser/testdata/parse/postgres_regress/spgist.metadata.json +++ b/parser/testdata/parse/postgres_regress/spgist.metadata.json @@ -13,7 +13,6 @@ "011", "012", "013", - "014", "015", "016", "017", @@ -27,7 +26,6 @@ "025", "026", "027", - "028", "029", "030", "031" diff --git a/parser/testdata/parse/postgres_regress/sqljson.metadata.json b/parser/testdata/parse/postgres_regress/sqljson.metadata.json index 78efa1d..00c02bf 100644 --- a/parser/testdata/parse/postgres_regress/sqljson.metadata.json +++ b/parser/testdata/parse/postgres_regress/sqljson.metadata.json @@ -1,19 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", "015", "016", "017", @@ -21,155 +7,19 @@ "019", "020", "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", "036", "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", "048", "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", "103", "104", "105", - "106", "107", "108", "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", "163", "164", "165", - "166", - "167", - "168", - "169", - "170", "171", "172", "173", @@ -184,40 +34,17 @@ "182", "183", "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", "194", "195", - "196", - "197", - "198", - "199", "200", "201", "202", - "203", - "204", - "205", - "206", - "207", "208", - "209", - "210", "211", "212", "213", - "214", "215", - "216", "217", - "218", "219" ] } diff --git a/parser/testdata/parse/postgres_regress/sqljson_jsontable.metadata.json b/parser/testdata/parse/postgres_regress/sqljson_jsontable.metadata.json index 17a73dc..92f697d 100644 --- a/parser/testdata/parse/postgres_regress/sqljson_jsontable.metadata.json +++ b/parser/testdata/parse/postgres_regress/sqljson_jsontable.metadata.json @@ -1,31 +1,9 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", "010", - "011", "012", - "013", - "014", - "015", "016", "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", "027", "028", "029", @@ -44,73 +22,18 @@ "042", "043", "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", "066", "067", - "068", - "069", - "070", - "071", - "072", "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", "091", "092", - "093", - "094", "095", "096", "097", "098", - "099", - "100", - "101", - "102", - "103", "104", "105", "106", - "107", - "108", - "109", - "110", - "111", "112", "113", "114", diff --git a/parser/testdata/parse/postgres_regress/sqljson_queryfuncs.metadata.json b/parser/testdata/parse/postgres_regress/sqljson_queryfuncs.metadata.json index b0ece40..cec7a0c 100644 --- a/parser/testdata/parse/postgres_regress/sqljson_queryfuncs.metadata.json +++ b/parser/testdata/parse/postgres_regress/sqljson_queryfuncs.metadata.json @@ -1,207 +1,16 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", "055", - "056", - "057", - "058", - "059", - "060", "061", "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", "131", "132", - "133", - "134", "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", "176", - "177", - "178", - "179", "180", "181", "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", "200", - "201", - "202", "203", "204", "205", @@ -250,65 +59,18 @@ "248", "249", "250", - "251", - "252", - "253", - "254", "255", "256", "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", "267", "268", - "269", "270", "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", "291", "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", "301", "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", "310" ] } diff --git a/parser/testdata/parse/postgres_regress/stats.metadata.json b/parser/testdata/parse/postgres_regress/stats.metadata.json index 5fff658..f5298e7 100644 --- a/parser/testdata/parse/postgres_regress/stats.metadata.json +++ b/parser/testdata/parse/postgres_regress/stats.metadata.json @@ -5,7 +5,6 @@ "003", "004", "005", - "006", "007", "008", "009", @@ -54,375 +53,162 @@ "052", "053", "054", - "055", "056", - "057", "058", - "059", "060", "061", - "062", - "063", - "064", - "065", "066", "067", - "068", "069", - "070", "071", "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", "080", "081", - "082", "083", - "084", "085", - "086", - "087", "088", "089", - "090", "091", - "092", - "093", - "094", "095", - "096", "097", - "098", - "099", "100", - "101", - "102", "103", "104", "105", - "106", - "107", "108", - "109", "110", - "111", "112", "113", "114", - "115", - "116", "117", "118", - "119", "120", "121", - "122", "123", "124", - "125", - "126", - "127", "128", - "129", - "130", - "131", - "132", - "133", "134", "135", - "136", "137", - "138", "139", - "140", - "141", - "142", - "143", - "144", "145", "146", - "147", "148", - "149", "150", - "151", - "152", - "153", - "154", "155", "156", "157", "158", - "159", "160", "161", "162", - "163", "164", - "165", - "166", - "167", "168", "169", "170", "171", "172", "173", - "174", - "175", "176", "177", "178", "179", "180", "181", - "182", "183", "184", "185", "186", "187", - "188", - "189", "190", - "191", - "192", "193", "194", "195", "196", "197", - "198", "199", "200", - "201", - "202", "203", - "204", - "205", "206", "207", "208", "209", "210", - "211", - "212", "213", - "214", - "215", - "216", "217", "218", "219", "220", "221", - "222", - "223", "224", - "225", - "226", - "227", "228", "229", "230", "231", "232", - "233", - "234", "235", - "236", - "237", "238", - "239", "240", - "241", "242", - "243", - "244", - "245", "246", "247", - "248", - "249", - "250", - "251", - "252", "253", "254", "255", "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", "291", "292", - "293", - "294", - "295", - "296", - "297", "298", "299", "300", - "301", - "302", "303", - "304", - "305", - "306", "307", - "308", - "309", - "310", "311", - "312", - "313", - "314", - "315", "316", "317", - "318", "319", - "320", - "321", - "322", "323", - "324", "325", "326", - "327", - "328", - "329", "330", - "331", "332", - "333", - "334", - "335", "336", - "337", - "338", - "339", "340", - "341", "342", "343", - "344", "345", - "346", - "347", - "348", - "349", "350", "351", - "352", - "353", - "354", "355", "356", - "357", - "358", - "359", - "360", "361", "362", - "363", "364", - "365", - "366", - "367", - "368", "369", "370", "371", "372", "373", "374", - "375", "376", - "377", - "378", - "379", "380", "381", "382", - "383", "384", - "385", - "386", - "387", - "388", - "389", - "390", "391", - "392", - "393", - "394", "395", "396", - "397", "398", "399", "400", "401", - "402", - "403", - "404", - "405", "406", - "407", "408", - "409", - "410", - "411", - "412", - "413", - "414", - "415", - "416", "417", "418", "419", "420", "421", - "422", - "423", "424", "425", "426", @@ -430,22 +216,18 @@ "428", "429", "430", - "431", "432", "433", - "434", "435", "436", "437", "438", "439", "440", - "441", "442", "443", "444", "445", - "446", "447" ] } diff --git a/parser/testdata/parse/postgres_regress/stats_ext.metadata.json b/parser/testdata/parse/postgres_regress/stats_ext.metadata.json index b2f6706..20c5ce1 100644 --- a/parser/testdata/parse/postgres_regress/stats_ext.metadata.json +++ b/parser/testdata/parse/postgres_regress/stats_ext.metadata.json @@ -37,22 +37,18 @@ "035", "036", "037", - "038", "039", "040", "041", "042", "043", "044", - "045", "046", "047", "048", "049", "050", - "051", "052", - "053", "054", "055", "056", @@ -61,7 +57,6 @@ "059", "060", "061", - "062", "063", "064", "065", @@ -81,36 +76,24 @@ "079", "080", "081", - "082", - "083", "084", "085", - "086", - "087", - "088", - "089", "090", "091", "092", "093", "094", "095", - "096", - "097", - "098", "099", "100", "101", "102", - "103", "104", - "105", "106", "107", "108", "109", "110", - "111", "112", "113", "114", @@ -139,134 +122,38 @@ "137", "138", "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", "149", "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", "162", "163", "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", "189", "190", - "191", - "192", - "193", - "194", "195", - "196", - "197", - "198", "199", "200", - "201", - "202", - "203", - "204", "205", "206", "207", "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", "216", "217", "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", "226", "227", "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", "236", "237", "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", "246", "247", "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", "256", "257", "258", "259", "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", "268", "269", "270", @@ -274,320 +161,85 @@ "272", "273", "274", - "275", - "276", "277", "278", - "279", - "280", "281", "282", "283", "284", - "285", - "286", "287", "288", - "289", - "290", "291", "292", "293", "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", "320", "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", "348", - "349", "350", - "351", "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", - "376", - "377", "378", "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", "406", "407", "408", - "409", - "410", - "411", - "412", - "413", "414", "415", "416", - "417", - "418", - "419", - "420", - "421", "422", "423", "424", "425", - "426", - "427", "428", "429", - "430", - "431", "432", "433", "434", "435", - "436", - "437", "438", "439", - "440", - "441", "442", "443", "444", "445", - "446", - "447", - "448", - "449", - "450", - "451", - "452", - "453", - "454", - "455", - "456", - "457", - "458", - "459", - "460", - "461", - "462", - "463", - "464", - "465", - "466", - "467", - "468", - "469", "470", "471", - "472", - "473", - "474", - "475", - "476", - "477", - "478", - "479", - "480", - "481", - "482", - "483", - "484", - "485", - "486", - "487", - "488", - "489", - "490", - "491", - "492", - "493", - "494", - "495", - "496", "497", - "498", "499", - "500", "501", - "502", "503", "504", "505", "506", - "507", - "508", - "509", - "510", - "511", - "512", - "513", - "514", - "515", - "516", "517", "518", "519", "520", - "521", - "522", - "523", - "524", - "525", - "526", - "527", - "528", - "529", - "530", "531", "532", "533", "534", "535", - "536", - "537", - "538", - "539", - "540", - "541", - "542", - "543", - "544", - "545", - "546", "547", "548", "549", "550", - "551", - "552", - "553", - "554", - "555", "556", "557", - "558", - "559", - "560", - "561", - "562", "563", "564", "565", - "566", "567", "568", "569", "570", - "571", - "572", - "573", "574", "575", - "576", - "577", - "578", - "579", "580", "581", "582", - "583", - "584", "585", "586", - "587", - "588", "589", "590", "591", @@ -596,97 +248,46 @@ "594", "595", "596", - "597", - "598", - "599", - "600", "601", "602", - "603", - "604", - "605", - "606", "607", "608", "609", "610", "611", - "612", - "613", - "614", - "615", - "616", - "617", - "618", - "619", "620", "621", - "622", - "623", - "624", - "625", - "626", - "627", - "628", - "629", "630", "631", "632", "633", - "634", - "635", - "636", - "637", - "638", - "639", - "640", "641", "642", "643", - "644", - "645", - "646", - "647", - "648", - "649", - "650", "651", "652", "653", "654", - "655", - "656", "657", "658", - "659", - "660", "661", "662", "663", "664", "665", - "666", - "667", - "668", "669", "670", - "671", - "672", - "673", "674", "675", "676", "677", - "678", "679", "680", - "681", "682", "683", "684", "685", "686", - "687", "688", "689", "690", @@ -725,44 +326,32 @@ "723", "724", "725", - "726", - "727", "728", "729", "730", "731", - "732", - "733", "734", "735", "736", "737", "738", - "739", - "740", "741", "742", "743", "744", "745", "746", - "747", - "748", "749", "750", "751", "752", "753", - "754", - "755", "756", "757", "758", "759", "760", "761", - "762", - "763", "764", "765", "766", @@ -771,13 +360,9 @@ "769", "770", "771", - "772", - "773", "774", "775", "776", - "777", - "778", "779", "780", "781", diff --git a/parser/testdata/parse/postgres_regress/strings.metadata.json b/parser/testdata/parse/postgres_regress/strings.metadata.json index f23fe5c..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/strings.metadata.json +++ b/parser/testdata/parse/postgres_regress/strings.metadata.json @@ -1,5 +1,3 @@ { - "todo": [ - "001" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/subscription.metadata.json b/parser/testdata/parse/postgres_regress/subscription.metadata.json index d3267aa..546b760 100644 --- a/parser/testdata/parse/postgres_regress/subscription.metadata.json +++ b/parser/testdata/parse/postgres_regress/subscription.metadata.json @@ -14,13 +14,6 @@ "012", "013", "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", "022", "023", "024", @@ -106,7 +99,6 @@ "104", "105", "106", - "107", "108", "109", "110", diff --git a/parser/testdata/parse/postgres_regress/subselect.metadata.json b/parser/testdata/parse/postgres_regress/subselect.metadata.json index 354a8d0..fa5a5df 100644 --- a/parser/testdata/parse/postgres_regress/subselect.metadata.json +++ b/parser/testdata/parse/postgres_regress/subselect.metadata.json @@ -1,18 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", "014", "015", "016", @@ -22,54 +9,24 @@ "020", "021", "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", "032", - "033", "034", - "035", - "036", - "037", - "038", - "039", "040", - "041", "042", "043", "044", - "045", - "046", - "047", "048", "049", "050", - "051", "052", "053", "054", - "055", - "056", - "057", - "058", "059", "060", "061", "062", "063", "064", - "065", - "066", - "067", - "068", - "069", - "070", "071", "072", "073", @@ -83,7 +40,6 @@ "081", "082", "083", - "084", "085", "086", "087", @@ -91,19 +47,12 @@ "089", "090", "091", - "092", "093", "094", - "095", - "096", - "097", - "098", "099", "100", "101", "102", - "103", - "104", "105", "106", "107", @@ -115,28 +64,17 @@ "113", "114", "115", - "116", "117", - "118", "119", "120", "121", - "122", - "123", - "124", - "125", "126", - "127", - "128", - "129", "130", "131", "132", - "133", "134", "135", "136", - "137", "138", "139", "140", @@ -145,7 +83,6 @@ "143", "144", "145", - "146", "147", "148", "149", @@ -154,80 +91,50 @@ "152", "153", "154", - "155", "156", - "157", "158", - "159", - "160", - "161", "162", "163", "164", "165", - "166", "167", "168", - "169", "170", "171", - "172", "173", "174", - "175", "176", - "177", "178", "179", "180", "181", "182", "183", - "184", - "185", "186", "187", "188", "189", "190", - "191", "192", - "193", "194", - "195", "196", "197", "198", - "199", "200", - "201", - "202", "203", - "204", "205", - "206", "207", - "208", - "209", "210", - "211", "212", - "213", - "214", "215", "216", - "217", "218", "219", - "220", "221", - "222", "223", "224", "225", "226", - "227", - "228", "229", "230", "231", @@ -239,14 +146,10 @@ "237", "238", "239", - "240", "241", "242", - "243", "244", - "245", "246", - "247", "248", "249", "250", @@ -255,9 +158,7 @@ "253", "254", "255", - "256", "257", - "258", "259", "260", "261", diff --git a/parser/testdata/parse/postgres_regress/sysviews.metadata.json b/parser/testdata/parse/postgres_regress/sysviews.metadata.json index 7249d3a..06e70ed 100644 --- a/parser/testdata/parse/postgres_regress/sysviews.metadata.json +++ b/parser/testdata/parse/postgres_regress/sysviews.metadata.json @@ -1,31 +1,10 @@ { "todo": [ - "001", - "002", - "003", "004", "005", "006", - "007", "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", "024", - "025", - "026", - "027" + "026" ] } diff --git a/parser/testdata/parse/postgres_regress/tablesample.metadata.json b/parser/testdata/parse/postgres_regress/tablesample.metadata.json index dc9d431..2727d5e 100644 --- a/parser/testdata/parse/postgres_regress/tablesample.metadata.json +++ b/parser/testdata/parse/postgres_regress/tablesample.metadata.json @@ -2,14 +2,6 @@ "todo": [ "001", "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", "011", "012", "013", @@ -17,7 +9,6 @@ "015", "016", "017", - "018", "019", "020", "021", @@ -32,25 +23,8 @@ "030", "031", "032", - "033", - "034", - "035", - "036", - "037", "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", "049", - "050", - "051", "052", "053", "054", diff --git a/parser/testdata/parse/postgres_regress/tablespace.metadata.json b/parser/testdata/parse/postgres_regress/tablespace.metadata.json index 479ae3b..252c4c8 100644 --- a/parser/testdata/parse/postgres_regress/tablespace.metadata.json +++ b/parser/testdata/parse/postgres_regress/tablespace.metadata.json @@ -5,9 +5,7 @@ "003", "004", "005", - "006", "007", - "008", "009", "010", "011", @@ -31,20 +29,11 @@ "029", "030", "031", - "032", - "033", - "034", "035", - "036", "037", "038", - "039", "040", - "041", "042", - "043", - "044", - "045", "046", "047", "048", @@ -60,23 +49,17 @@ "058", "059", "060", - "061", "062", "063", - "064", "065", "066", "067", - "068", "069", "070", "071", - "072", "073", "074", - "075", "076", - "077", "078", "079", "080", @@ -95,14 +78,12 @@ "093", "094", "095", - "096", "097", "098", "099", "100", "101", "102", - "103", "104", "105", "106", @@ -120,9 +101,7 @@ "118", "119", "120", - "121", "122", - "123", "124", "125", "126", @@ -136,9 +115,7 @@ "134", "135", "136", - "137", "138", - "139", "140", "141", "142", @@ -149,7 +126,6 @@ "147", "148", "149", - "150", "151", "152", "153", @@ -168,11 +144,9 @@ "166", "167", "168", - "169", "170", "171", "172", - "173", "174", "175", "176", diff --git a/parser/testdata/parse/postgres_regress/temp.metadata.json b/parser/testdata/parse/postgres_regress/temp.metadata.json index 4e31a92..e7f7107 100644 --- a/parser/testdata/parse/postgres_regress/temp.metadata.json +++ b/parser/testdata/parse/postgres_regress/temp.metadata.json @@ -4,54 +4,39 @@ "002", "003", "004", - "005", "006", "007", - "008", "009", "010", "011", "012", "013", "014", - "015", "016", - "017", "018", "019", - "020", "021", "022", "023", "024", "025", - "026", "027", - "028", "029", "030", "031", - "032", "033", - "034", "035", "036", "037", "038", "039", - "040", "041", - "042", "043", "044", - "045", "046", - "047", "048", "049", - "050", "051", - "052", "053", "054", "055", @@ -60,8 +45,6 @@ "058", "059", "060", - "061", - "062", "063", "064", "065", @@ -72,28 +55,17 @@ "070", "071", "072", - "073", - "074", "075", - "076", - "077", "078", - "079", - "080", - "081", "082", "083", "084", - "085", - "086", - "087", "088", "089", "090", "091", "092", "093", - "094", "095", "096", "097", @@ -101,30 +73,24 @@ "099", "100", "101", - "102", "103", "104", "105", "106", "107", "108", - "109", - "110", "111", "112", "113", "114", "115", "116", - "117", "118", "119", "120", "121", "122", "123", - "124", - "125", "126", "127", "128", @@ -147,7 +113,6 @@ "145", "146", "147", - "148", "149", "150", "151", @@ -160,7 +125,6 @@ "158", "159", "160", - "161", "162" ] } diff --git a/parser/testdata/parse/postgres_regress/text.metadata.json b/parser/testdata/parse/postgres_regress/text.metadata.json index 2ff9db8..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/text.metadata.json +++ b/parser/testdata/parse/postgres_regress/text.metadata.json @@ -1,77 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/tid.metadata.json b/parser/testdata/parse/postgres_regress/tid.metadata.json index 66f0b1d..a58fbb0 100644 --- a/parser/testdata/parse/postgres_regress/tid.metadata.json +++ b/parser/testdata/parse/postgres_regress/tid.metadata.json @@ -1,44 +1,26 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", "008", "009", - "010", - "011", "012", "013", - "014", "015", "016", - "017", "018", "019", "020", - "021", "022", "023", - "024", "025", "026", - "027", "028", "029", - "030", "031", "032", - "033", "034", - "035", "036", "037", "038", - "039", "040", "041" ] diff --git a/parser/testdata/parse/postgres_regress/tidrangescan.metadata.json b/parser/testdata/parse/postgres_regress/tidrangescan.metadata.json index f069709..e741d6a 100644 --- a/parser/testdata/parse/postgres_regress/tidrangescan.metadata.json +++ b/parser/testdata/parse/postgres_regress/tidrangescan.metadata.json @@ -3,37 +3,20 @@ "001", "002", "003", - "004", "005", - "006", "007", "008", "009", "010", - "011", "012", - "013", "014", - "015", "016", - "017", "018", - "019", "020", - "021", "022", - "023", "024", - "025", "026", - "027", - "028", - "029", - "030", - "031", - "032", "033", - "034", "035", "036", "037", diff --git a/parser/testdata/parse/postgres_regress/tidscan.metadata.json b/parser/testdata/parse/postgres_regress/tidscan.metadata.json index 74725a7..ac36ec6 100644 --- a/parser/testdata/parse/postgres_regress/tidscan.metadata.json +++ b/parser/testdata/parse/postgres_regress/tidscan.metadata.json @@ -2,24 +2,15 @@ "todo": [ "001", "002", - "003", "004", - "005", "006", - "007", "008", - "009", "010", - "011", "012", - "013", "014", - "015", "016", "017", - "018", "019", - "020", "021", "022", "023", @@ -34,19 +25,14 @@ "032", "033", "034", - "035", "036", "037", "038", "039", - "040", "041", "042", - "043", "044", "045", - "046", - "047", "048", "049" ] diff --git a/parser/testdata/parse/postgres_regress/time.metadata.json b/parser/testdata/parse/postgres_regress/time.metadata.json index c30fd55..bf73c3a 100644 --- a/parser/testdata/parse/postgres_regress/time.metadata.json +++ b/parser/testdata/parse/postgres_regress/time.metadata.json @@ -11,38 +11,6 @@ "009", "010", "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044" + "012" ] } diff --git a/parser/testdata/parse/postgres_regress/timestamp.metadata.json b/parser/testdata/parse/postgres_regress/timestamp.metadata.json index 91e3e07..b93047b 100644 --- a/parser/testdata/parse/postgres_regress/timestamp.metadata.json +++ b/parser/testdata/parse/postgres_regress/timestamp.metadata.json @@ -7,26 +7,17 @@ "005", "006", "007", - "008", - "009", - "010", "011", "012", "013", - "014", "015", "016", - "017", "018", - "019", - "020", - "021", "022", "023", "024", "025", "026", - "027", "028", "029", "030", @@ -61,11 +52,6 @@ "059", "060", "061", - "062", - "063", - "064", - "065", - "066", "067", "068", "069", @@ -99,77 +85,6 @@ "097", "098", "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171" + "100" ] } diff --git a/parser/testdata/parse/postgres_regress/timestamptz.metadata.json b/parser/testdata/parse/postgres_regress/timestamptz.metadata.json index 82ef9cc..f7e3721 100644 --- a/parser/testdata/parse/postgres_regress/timestamptz.metadata.json +++ b/parser/testdata/parse/postgres_regress/timestamptz.metadata.json @@ -7,28 +7,17 @@ "005", "006", "007", - "008", - "009", - "010", - "011", - "012", "013", "014", "015", - "016", "017", "018", - "019", "020", - "021", - "022", - "023", "024", "025", "026", "027", "028", - "029", "030", "031", "032", @@ -62,20 +51,8 @@ "060", "061", "062", - "063", "064", - "065", "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", "077", "078", "079", @@ -110,103 +87,25 @@ "108", "109", "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", "171", - "172", "173", - "174", "175", - "176", "177", - "178", "179", - "180", "181", - "182", "183", - "184", "185", - "186", "187", - "188", "189", "190", - "191", "192", - "193", "194", - "195", "196", - "197", "198", - "199", "200", - "201", "202", - "203", "204", - "205", "206", - "207", "208", "209", "210", @@ -215,172 +114,23 @@ "213", "214", "215", - "216", "217", "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", "237", - "238", - "239", - "240", - "241", - "242", "243", - "244", - "245", - "246", - "247", - "248", "249", "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "287", - "288", - "289", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", "354", "355", - "356", - "357", "358", - "359", - "360", "361", "362", - "363", - "364", "365", "366", "367", "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", - "376", - "377", - "378", - "379", - "380", - "381", - "382" + "369" ] } diff --git a/parser/testdata/parse/postgres_regress/timetz.metadata.json b/parser/testdata/parse/postgres_regress/timetz.metadata.json index 7c6405d..97f0ba8 100644 --- a/parser/testdata/parse/postgres_regress/timetz.metadata.json +++ b/parser/testdata/parse/postgres_regress/timetz.metadata.json @@ -16,46 +16,9 @@ "014", "015", "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", "051", "052", "053", - "054", - "055", - "056", "057" ] } diff --git a/parser/testdata/parse/postgres_regress/transactions.metadata.json b/parser/testdata/parse/postgres_regress/transactions.metadata.json index 342e97a..1c91cc5 100644 --- a/parser/testdata/parse/postgres_regress/transactions.metadata.json +++ b/parser/testdata/parse/postgres_regress/transactions.metadata.json @@ -5,24 +5,17 @@ "003", "004", "005", - "006", "007", "008", "009", - "010", "011", - "012", - "013", "014", - "015", "016", "017", "018", - "019", "020", "021", "022", - "023", "024", "025", "026", @@ -30,17 +23,14 @@ "028", "029", "030", - "031", "032", "033", "034", "035", "036", "037", - "038", "039", "040", - "041", "042", "043", "044", @@ -49,7 +39,6 @@ "047", "048", "049", - "050", "051", "052", "053", @@ -57,24 +46,20 @@ "055", "056", "057", - "058", "059", "060", "061", "062", - "063", "064", "065", "066", "067", "068", "069", - "070", "071", "072", "073", "074", - "075", "076", "077", "078", @@ -94,10 +79,6 @@ "092", "093", "094", - "095", - "096", - "097", - "098", "099", "100", "101", @@ -115,11 +96,8 @@ "113", "114", "115", - "116", - "117", "118", "119", - "120", "121", "122", "123", @@ -133,7 +111,6 @@ "131", "132", "133", - "134", "135", "136", "137", @@ -144,14 +121,11 @@ "142", "143", "144", - "145", "146", "147", "148", "149", - "150", "151", - "152", "153", "154", "155", @@ -159,8 +133,6 @@ "157", "158", "159", - "160", - "161", "162", "163", "164", @@ -168,8 +140,6 @@ "166", "167", "168", - "169", - "170", "171", "172", "173", @@ -183,7 +153,6 @@ "181", "182", "183", - "184", "185", "186", "187", @@ -195,20 +164,16 @@ "193", "194", "195", - "196", "197", "198", "199", "200", "201", "202", - "203", "204", "205", "206", - "207", "208", - "209", "210", "211", "212", @@ -227,26 +192,21 @@ "225", "226", "227", - "228", "229", "230", "231", - "232", "233", "234", "235", "236", - "237", "238", "239", "240", "241", - "242", "243", "244", "245", "246", - "247", "248", "249", "250", @@ -373,19 +333,11 @@ "371", "372", "373", - "374", "375", "376", "377", - "378", - "379", - "380", "381", - "382", "383", - "384", - "385", - "386", "387", "388", "389", @@ -395,39 +347,26 @@ "393", "394", "395", - "396", "397", "398", "399", - "400", "401", "402", "403", "404", "405", "406", - "407", "408", "409", - "410", - "411", "412", - "413", "414", - "415", "416", "417", - "418", "419", - "420", "421", "422", "423", - "424", - "425", "426", - "427", - "428", "429", "430", "431", @@ -479,7 +418,6 @@ "477", "478", "479", - "480", "481", "482", "483", @@ -488,7 +426,6 @@ "486", "487", "488", - "489", "490" ] } diff --git a/parser/testdata/parse/postgres_regress/triggers.metadata.json b/parser/testdata/parse/postgres_regress/triggers.metadata.json index a56f329..40f5a5a 100644 --- a/parser/testdata/parse/postgres_regress/triggers.metadata.json +++ b/parser/testdata/parse/postgres_regress/triggers.metadata.json @@ -41,53 +41,35 @@ "039", "040", "041", - "042", "043", "044", "045", "046", "047", "048", - "049", "050", - "051", "052", - "053", "054", "055", "056", - "057", "058", - "059", "060", - "061", "062", "063", - "064", "065", - "066", "067", - "068", "069", "070", - "071", "072", - "073", "074", - "075", "076", "077", "078", "079", - "080", "081", - "082", "083", - "084", "085", - "086", "087", - "088", "089", "090", "091", @@ -96,10 +78,7 @@ "094", "095", "096", - "097", "098", - "099", - "100", "1000", "1001", "1002", @@ -121,7 +100,6 @@ "1017", "1018", "1019", - "102", "1020", "1021", "1022", @@ -143,8 +121,6 @@ "1037", "1038", "1039", - "104", - "1040", "1041", "1042", "1043", @@ -152,9 +128,7 @@ "1045", "1046", "1047", - "1048", "1049", - "105", "1050", "1051", "1052", @@ -164,15 +138,9 @@ "1056", "106", "107", - "108", "109", - "110", - "111", "112", - "113", "114", - "115", - "116", "117", "118", "119", @@ -189,25 +157,17 @@ "130", "131", "132", - "133", "134", "135", "136", "137", "138", "139", - "140", "141", "142", "143", "144", - "145", - "146", - "147", - "148", "149", - "150", - "151", "152", "153", "154", @@ -225,7 +185,6 @@ "166", "167", "168", - "169", "170", "171", "172", @@ -274,12 +233,9 @@ "215", "216", "217", - "218", "219", "220", - "221", "222", - "223", "224", "225", "226", @@ -313,7 +269,6 @@ "254", "255", "256", - "257", "258", "259", "260", @@ -321,7 +276,6 @@ "262", "263", "264", - "265", "266", "267", "268", @@ -386,7 +340,6 @@ "327", "328", "329", - "330", "331", "332", "333", @@ -402,7 +355,6 @@ "343", "344", "345", - "346", "347", "348", "349", @@ -414,11 +366,8 @@ "355", "356", "357", - "358", "359", - "360", "361", - "362", "363", "364", "365", @@ -435,20 +384,12 @@ "376", "377", "378", - "379", - "380", "381", "382", - "383", - "384", "385", "386", - "387", - "388", "389", "390", - "391", - "392", "393", "394", "395", @@ -465,9 +406,7 @@ "406", "407", "408", - "409", "410", - "411", "412", "413", "414", @@ -501,7 +440,6 @@ "442", "443", "444", - "445", "446", "447", "448", @@ -527,14 +465,11 @@ "468", "469", "470", - "471", "472", "473", "474", "475", - "476", "477", - "478", "479", "480", "481", @@ -545,7 +480,6 @@ "486", "487", "488", - "489", "490", "491", "492", @@ -654,21 +588,17 @@ "595", "596", "597", - "598", "599", "600", "601", "602", - "603", "604", "605", "606", "607", "608", "609", - "610", "611", - "612", "613", "614", "615", @@ -678,7 +608,6 @@ "619", "620", "621", - "622", "623", "624", "625", @@ -726,7 +655,6 @@ "667", "668", "669", - "670", "671", "672", "673", @@ -749,7 +677,6 @@ "690", "691", "692", - "693", "694", "695", "696", @@ -757,28 +684,20 @@ "698", "699", "700", - "701", "702", - "703", "704", "705", "706", "707", "708", - "709", "710", "711", - "712", "713", - "714", "715", - "716", "717", "718", "719", - "720", "721", - "722", "723", "724", "725", @@ -799,7 +718,6 @@ "740", "741", "742", - "743", "744", "745", "746", @@ -830,7 +748,6 @@ "771", "772", "773", - "774", "775", "776", "777", @@ -946,8 +863,6 @@ "887", "888", "889", - "890", - "891", "892", "893", "894", @@ -979,9 +894,7 @@ "920", "921", "922", - "923", "924", - "925", "926", "927", "928", @@ -1021,7 +934,6 @@ "962", "963", "964", - "965", "966", "967", "968", diff --git a/parser/testdata/parse/postgres_regress/truncate.metadata.json b/parser/testdata/parse/postgres_regress/truncate.metadata.json index 5ad4c2c..f5e413f 100644 --- a/parser/testdata/parse/postgres_regress/truncate.metadata.json +++ b/parser/testdata/parse/postgres_regress/truncate.metadata.json @@ -3,15 +3,12 @@ "001", "002", "003", - "004", "005", "006", "007", - "008", "009", "010", "011", - "012", "013", "014", "015", @@ -38,16 +35,12 @@ "036", "037", "038", - "039", - "040", "041", "042", "043", "044", "045", "046", - "047", - "048", "049", "050", "051", @@ -59,32 +52,16 @@ "057", "058", "059", - "060", "061", - "062", "063", "064", - "065", "066", - "067", "068", "069", - "070", - "071", - "072", "073", - "074", - "075", - "076", "077", "078", - "079", - "080", - "081", "082", - "083", - "084", - "085", "086", "087", "088", @@ -92,20 +69,12 @@ "090", "091", "092", - "093", - "094", "095", - "096", - "097", "098", "099", "100", "101", - "102", - "103", "104", - "105", - "106", "107", "108", "109", @@ -114,37 +83,28 @@ "112", "113", "114", - "115", "116", "117", "118", - "119", "120", "121", "122", - "123", "124", "125", "126", - "127", "128", "129", "130", - "131", "132", "133", "134", - "135", "136", "137", "138", - "139", "140", "141", "142", - "143", "144", - "145", "146", "147", "148", @@ -161,15 +121,9 @@ "159", "160", "161", - "162", "163", - "164", - "165", "166", - "167", - "168", "169", - "170", "171", "172", "173", @@ -183,15 +137,12 @@ "181", "182", "183", - "184", "185", "186", "187", "188", "189", "190", - "191", - "192", "193" ] } diff --git a/parser/testdata/parse/postgres_regress/tsdicts.metadata.json b/parser/testdata/parse/postgres_regress/tsdicts.metadata.json index 507be8d..0a1d992 100644 --- a/parser/testdata/parse/postgres_regress/tsdicts.metadata.json +++ b/parser/testdata/parse/postgres_regress/tsdicts.metadata.json @@ -1,74 +1,9 @@ { "todo": [ "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", "070", "071", "072", @@ -76,50 +11,20 @@ "074", "075", "076", - "077", - "078", - "079", - "080", "081", - "082", - "083", "084", "085", - "086", - "087", "088", - "089", "090", "091", - "092", - "093", - "094", "095", "096", - "097", - "098", - "099", - "100", - "101", "102", - "103", - "104", - "105", "106", - "107", - "108", - "109", "110", "111", - "112", - "113", - "114", - "115", "116", "117", - "118", - "119", - "120", "121", "122", "123", diff --git a/parser/testdata/parse/postgres_regress/tsearch.metadata.json b/parser/testdata/parse/postgres_regress/tsearch.metadata.json index 16d1dd4..96e90e3 100644 --- a/parser/testdata/parse/postgres_regress/tsearch.metadata.json +++ b/parser/testdata/parse/postgres_regress/tsearch.metadata.json @@ -1,94 +1,16 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", "007", "008", "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", "034", "035", "036", "037", "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", "063", "064", "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", "090", "091", "092", @@ -97,57 +19,9 @@ "095", "096", "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", "122", "123", "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", "149", "150", "151", @@ -155,292 +29,37 @@ "153", "154", "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", "180", - "181", "182", - "183", "184", "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270", - "271", - "272", - "273", - "274", - "275", - "276", - "277", - "278", - "279", - "280", - "281", "282", - "283", "284", "285", "286", - "287", - "288", - "289", - "290", - "291", "292", "293", - "294", - "295", - "296", - "297", - "298", "299", - "300", - "301", - "302", - "303", - "304", - "305", - "306", - "307", - "308", - "309", - "310", - "311", - "312", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", "324", "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", "339", "340", - "341", - "342", - "343", "344", - "345", - "346", - "347", "348", - "349", "350", - "351", "352", - "353", "354", - "355", "356", "357", "358", "359", "360", "361", - "362", - "363", - "364", - "365", - "366", "367", "368", "369", "370", "371", - "372", - "373", - "374", - "375", - "376", - "377", - "378", - "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "408", - "409", - "410", - "411", - "412", - "413", - "414", - "415", - "416", - "417", - "418", - "419", - "420", - "421", - "422", - "423", - "424", - "425", - "426", - "427", - "428", - "429", - "430", - "431", - "432", - "433", - "434", - "435", - "436", - "437", - "438", - "439", - "440", - "441", - "442" + "373" ] } diff --git a/parser/testdata/parse/postgres_regress/tsrf.metadata.json b/parser/testdata/parse/postgres_regress/tsrf.metadata.json index e49ea16..e3d4463 100644 --- a/parser/testdata/parse/postgres_regress/tsrf.metadata.json +++ b/parser/testdata/parse/postgres_regress/tsrf.metadata.json @@ -1,77 +1,23 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", "007", - "008", "009", "010", "011", - "012", "013", - "014", - "015", - "016", - "017", - "018", "019", - "020", - "021", - "022", "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", "037", - "038", - "039", - "040", - "041", - "042", - "043", "044", "045", - "046", "047", "048", - "049", "050", "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", "065", - "066", "067", - "068", "069", - "070", "071", - "072", "073", "074" ] diff --git a/parser/testdata/parse/postgres_regress/tstypes.metadata.json b/parser/testdata/parse/postgres_regress/tstypes.metadata.json index 1ef8c5f..f23fe5c 100644 --- a/parser/testdata/parse/postgres_regress/tstypes.metadata.json +++ b/parser/testdata/parse/postgres_regress/tstypes.metadata.json @@ -1,242 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", - "166", - "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238" + "001" ] } diff --git a/parser/testdata/parse/postgres_regress/tuplesort.metadata.json b/parser/testdata/parse/postgres_regress/tuplesort.metadata.json index c2deed3..e4cf5e2 100644 --- a/parser/testdata/parse/postgres_regress/tuplesort.metadata.json +++ b/parser/testdata/parse/postgres_regress/tuplesort.metadata.json @@ -8,49 +8,30 @@ "006", "007", "008", - "009", - "010", - "011", - "012", - "013", - "014", "015", "016", "017", - "018", "019", - "020", "021", "022", "023", - "024", "025", - "026", "027", "028", "029", - "030", - "031", "032", "033", "034", "035", - "036", - "037", "038", "039", "040", "041", - "042", - "043", "044", "045", "046", "047", - "048", - "049", "050", - "051", "052", "053", "054", @@ -90,10 +71,8 @@ "088", "089", "090", - "091", "092", "093", - "094", "095", "096", "097", @@ -101,7 +80,6 @@ "099", "100", "101", - "102", "103", "104", "105", diff --git a/parser/testdata/parse/postgres_regress/txid.metadata.json b/parser/testdata/parse/postgres_regress/txid.metadata.json index c7ce9e3..b5cf648 100644 --- a/parser/testdata/parse/postgres_regress/txid.metadata.json +++ b/parser/testdata/parse/postgres_regress/txid.metadata.json @@ -1,51 +1,20 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", "008", "009", "010", "011", "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", "024", - "025", - "026", - "027", "028", "029", - "030", "031", "032", - "033", "034", "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", "043", "044", "045", - "046", "047" ] } diff --git a/parser/testdata/parse/postgres_regress/type_sanity.metadata.json b/parser/testdata/parse/postgres_regress/type_sanity.metadata.json index 6a71114..5b604f4 100644 --- a/parser/testdata/parse/postgres_regress/type_sanity.metadata.json +++ b/parser/testdata/parse/postgres_regress/type_sanity.metadata.json @@ -1,65 +1,5 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061" + "060" ] } diff --git a/parser/testdata/parse/postgres_regress/typed_table.metadata.json b/parser/testdata/parse/postgres_regress/typed_table.metadata.json index d49a93c..16d3d04 100644 --- a/parser/testdata/parse/postgres_regress/typed_table.metadata.json +++ b/parser/testdata/parse/postgres_regress/typed_table.metadata.json @@ -4,9 +4,7 @@ "002", "003", "004", - "005", "006", - "007", "008", "009", "010", @@ -25,7 +23,6 @@ "023", "024", "025", - "026", "027", "028" ] diff --git a/parser/testdata/parse/postgres_regress/unicode.metadata.json b/parser/testdata/parse/postgres_regress/unicode.metadata.json index f51f5c0..737fd31 100644 --- a/parser/testdata/parse/postgres_regress/unicode.metadata.json +++ b/parser/testdata/parse/postgres_regress/unicode.metadata.json @@ -1,21 +1,3 @@ { - "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017" - ] + "todo": [] } diff --git a/parser/testdata/parse/postgres_regress/union.metadata.json b/parser/testdata/parse/postgres_regress/union.metadata.json index c2aa882..9b74ccf 100644 --- a/parser/testdata/parse/postgres_regress/union.metadata.json +++ b/parser/testdata/parse/postgres_regress/union.metadata.json @@ -1,58 +1,13 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", "040", "041", - "042", "043", - "044", "045", - "046", "047", "048", - "049", "050", - "051", "052", - "053", "054", "055", "056", @@ -61,82 +16,37 @@ "059", "060", "061", - "062", "063", - "064", "065", - "066", "067", - "068", "069", "070", - "071", "072", - "073", "074", - "075", "076", "077", "078", - "079", "080", - "081", "082", - "083", "084", - "085", "086", "087", - "088", "089", "090", "091", - "092", "093", - "094", "095", - "096", "097", "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", "114", "115", "116", - "117", - "118", - "119", - "120", - "121", "122", "123", "124", "125", - "126", - "127", - "128", - "129", - "130", - "131", - "132", - "133", "134", "135", - "136", - "137", "138", "139", "140", @@ -157,7 +67,6 @@ "155", "156", "157", - "158", "159", "160", "161", @@ -170,25 +79,18 @@ "168", "169", "170", - "171", "172", - "173", "174", - "175", "176", - "177", "178", - "179", "180", "181", "182", "183", "184", - "185", "186", "187", "188", - "189", "190", "191" ] diff --git a/parser/testdata/parse/postgres_regress/updatable_views.metadata.json b/parser/testdata/parse/postgres_regress/updatable_views.metadata.json index 317bbe8..91b84bc 100644 --- a/parser/testdata/parse/postgres_regress/updatable_views.metadata.json +++ b/parser/testdata/parse/postgres_regress/updatable_views.metadata.json @@ -24,9 +24,6 @@ "022", "023", "024", - "025", - "026", - "027", "028", "029", "030", @@ -49,36 +46,26 @@ "047", "048", "049", - "050", "051", "052", "053", - "054", "055", - "056", "057", "058", "059", - "060", "061", - "062", "063", - "064", "065", - "066", - "067", "068", "069", "070", "071", "072", - "073", "074", "075", "076", "077", "078", - "079", "080", "081", "082", @@ -98,26 +85,21 @@ "096", "097", "098", - "099", - "100", "1000", "1001", "1002", "1003", "1004", - "1005", "1006", "1007", "1008", "1009", - "101", "1010", "1011", "1012", "1013", "1014", "1015", - "1016", "1017", "1018", "1019", @@ -125,7 +107,6 @@ "1020", "1021", "1022", - "1023", "1024", "1025", "1026", @@ -149,7 +130,6 @@ "1042", "1043", "1044", - "1045", "1046", "1047", "1048", @@ -163,9 +143,7 @@ "1055", "1056", "1057", - "1058", "1059", - "106", "1060", "1061", "1062", @@ -179,7 +157,6 @@ "107", "1070", "1071", - "1072", "1073", "1074", "1075", @@ -187,29 +164,24 @@ "1077", "1078", "1079", - "108", "1080", "1081", "1082", "1083", "1084", - "1085", "1086", "1087", "1088", "1089", "109", "1090", - "1091", "1092", "1093", "1094", "1095", "1096", "1097", - "1098", "1099", - "110", "1100", "111", "112", @@ -219,28 +191,19 @@ "116", "117", "118", - "119", "120", - "121", "122", "123", "124", "125", "126", "127", - "128", - "129", - "130", "131", "132", - "133", "134", "135", - "136", "137", - "138", "139", - "140", "141", "142", "143", @@ -248,26 +211,12 @@ "145", "146", "147", - "148", - "149", - "150", "151", - "152", - "153", - "154", "155", - "156", - "157", - "158", "159", - "160", - "161", - "162", "163", "164", - "165", "166", - "167", "168", "169", "170", @@ -276,31 +225,15 @@ "173", "174", "175", - "176", - "177", - "178", "179", "180", - "181", - "182", - "183", "184", - "185", - "186", - "187", "188", - "189", - "190", - "191", "192", "193", - "194", "195", - "196", "197", - "198", "199", - "200", "201", "202", "203", @@ -313,7 +246,6 @@ "210", "211", "212", - "213", "214", "215", "216", @@ -321,7 +253,6 @@ "218", "219", "220", - "221", "222", "223", "224", @@ -339,9 +270,6 @@ "236", "237", "238", - "239", - "240", - "241", "242", "243", "244", @@ -373,7 +301,6 @@ "270", "271", "272", - "273", "274", "275", "276", @@ -388,71 +315,50 @@ "285", "286", "287", - "288", "289", "290", "291", "292", "293", "294", - "295", - "296", "297", "298", "299", "300", - "301", - "302", "303", "304", "305", "306", "307", - "308", - "309", "310", "311", "312", - "313", - "314", "315", "316", "317", "318", "319", - "320", - "321", "322", "323", "324", "325", "326", - "327", - "328", "329", "330", "331", - "332", - "333", "334", "335", "336", "337", "338", - "339", - "340", "341", "342", "343", "344", "345", - "346", - "347", "348", "349", "350", - "351", - "352", "353", "354", "355", @@ -466,8 +372,6 @@ "363", "364", "365", - "366", - "367", "368", "369", "370", @@ -480,8 +384,6 @@ "377", "378", "379", - "380", - "381", "382", "383", "384", @@ -511,7 +413,6 @@ "408", "409", "410", - "411", "412", "413", "414", @@ -519,48 +420,40 @@ "416", "417", "418", - "419", "420", "421", "422", "423", "424", - "425", "426", "427", "428", "429", "430", "431", - "432", "433", "434", "435", "436", "437", - "438", "439", "440", "441", - "442", "443", "444", "445", "446", "447", "448", - "449", "450", "451", "452", - "453", "454", "455", "456", "457", "458", "459", - "460", "461", "462", "463", @@ -568,7 +461,6 @@ "465", "466", "467", - "468", "469", "470", "471", @@ -579,7 +471,6 @@ "476", "477", "478", - "479", "480", "481", "482", @@ -589,11 +480,9 @@ "486", "487", "488", - "489", "490", "491", "492", - "493", "494", "495", "496", @@ -601,7 +490,6 @@ "498", "499", "500", - "501", "502", "503", "504", @@ -611,7 +499,6 @@ "508", "509", "510", - "511", "512", "513", "514", @@ -619,7 +506,6 @@ "516", "517", "518", - "519", "520", "521", "522", @@ -640,7 +526,6 @@ "537", "538", "539", - "540", "541", "542", "543", @@ -649,7 +534,6 @@ "546", "547", "548", - "549", "550", "551", "552", @@ -657,18 +541,14 @@ "554", "555", "556", - "557", "558", - "559", "560", "561", - "562", "563", "564", "565", "566", "567", - "568", "569", "570", "571", @@ -693,11 +573,6 @@ "590", "591", "592", - "593", - "594", - "595", - "596", - "597", "598", "599", "600", @@ -707,10 +582,8 @@ "604", "605", "606", - "607", "608", "609", - "610", "611", "612", "613", @@ -718,9 +591,6 @@ "615", "616", "617", - "618", - "619", - "620", "621", "622", "623", @@ -731,28 +601,21 @@ "628", "629", "630", - "631", - "632", "633", "634", "635", "636", - "637", - "638", "639", "640", "641", "642", "643", "644", - "645", - "646", "647", "648", "649", "650", "651", - "652", "653", "654", "655", @@ -760,42 +623,33 @@ "657", "658", "659", - "660", "661", "662", "663", "664", - "665", "666", "667", "668", "669", - "670", "671", "672", "673", - "674", "675", "676", "677", - "678", "679", "680", - "681", "682", "683", "684", "685", "686", - "687", "688", - "689", "690", "691", "692", "693", "694", - "695", "696", "697", "698", @@ -847,11 +701,9 @@ "744", "745", "746", - "747", "748", "749", "750", - "751", "752", "753", "754", @@ -861,7 +713,6 @@ "758", "759", "760", - "761", "762", "763", "764", @@ -875,14 +726,9 @@ "772", "773", "774", - "775", "776", "777", "778", - "779", - "780", - "781", - "782", "783", "784", "785", @@ -891,10 +737,6 @@ "788", "789", "790", - "791", - "792", - "793", - "794", "795", "796", "797", @@ -908,12 +750,10 @@ "805", "806", "807", - "808", "809", "810", "811", "812", - "813", "814", "815", "816", @@ -932,17 +772,11 @@ "829", "830", "831", - "832", - "833", "834", "835", - "836", - "837", "838", "839", - "840", "841", - "842", "843", "844", "845", @@ -951,8 +785,6 @@ "848", "849", "850", - "851", - "852", "853", "854", "855", @@ -963,8 +795,6 @@ "860", "861", "862", - "863", - "864", "865", "866", "867", @@ -978,8 +808,6 @@ "875", "876", "877", - "878", - "879", "880", "881", "882", @@ -997,7 +825,6 @@ "894", "895", "896", - "897", "898", "899", "900", @@ -1027,19 +854,12 @@ "924", "925", "926", - "927", - "928", - "929", - "930", - "931", "932", - "933", "934", "935", "936", "937", "938", - "939", "940", "941", "942", @@ -1060,14 +880,10 @@ "957", "958", "959", - "960", "961", - "962", "963", - "964", "965", "966", - "967", "968", "969", "970", @@ -1075,17 +891,13 @@ "972", "973", "974", - "975", "976", "977", "978", - "979", "980", "981", - "982", "983", "984", - "985", "986", "987", "988", diff --git a/parser/testdata/parse/postgres_regress/update.metadata.json b/parser/testdata/parse/postgres_regress/update.metadata.json index 1b73a29..ceeb05a 100644 --- a/parser/testdata/parse/postgres_regress/update.metadata.json +++ b/parser/testdata/parse/postgres_regress/update.metadata.json @@ -4,39 +4,26 @@ "002", "003", "004", - "005", "006", - "007", "008", - "009", "010", - "011", "012", "013", - "014", "015", "016", - "017", "018", - "019", "020", - "021", "022", "023", - "024", "025", - "026", "027", "028", - "029", "030", "031", "032", "033", - "034", "035", "036", - "037", "038", "039", "040", @@ -218,27 +205,20 @@ "216", "217", "218", - "219", "220", - "221", "222", "223", - "224", "225", - "226", "227", "228", "229", "230", - "231", "232", "233", - "234", "235", "236", "237", "238", - "239", "240", "241", "242", diff --git a/parser/testdata/parse/postgres_regress/uuid.metadata.json b/parser/testdata/parse/postgres_regress/uuid.metadata.json index c30fd55..b171ee4 100644 --- a/parser/testdata/parse/postgres_regress/uuid.metadata.json +++ b/parser/testdata/parse/postgres_regress/uuid.metadata.json @@ -8,41 +8,20 @@ "006", "007", "008", - "009", - "010", "011", "012", "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", "023", "024", "025", "026", - "027", "028", "029", "030", "031", - "032", - "033", "034", "035", "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", "044" ] } diff --git a/parser/testdata/parse/postgres_regress/vacuum.metadata.json b/parser/testdata/parse/postgres_regress/vacuum.metadata.json index 11c34e0..6077fb0 100644 --- a/parser/testdata/parse/postgres_regress/vacuum.metadata.json +++ b/parser/testdata/parse/postgres_regress/vacuum.metadata.json @@ -14,9 +14,7 @@ "012", "013", "014", - "015", "016", - "017", "018", "019", "020", @@ -31,11 +29,9 @@ "029", "030", "031", - "032", "033", "034", "035", - "036", "037", "038", "039", @@ -59,10 +55,8 @@ "057", "058", "059", - "060", "061", "062", - "063", "064", "065", "066", @@ -70,9 +64,7 @@ "068", "069", "070", - "071", "072", - "073", "074", "075", "076", @@ -139,9 +131,7 @@ "137", "138", "139", - "140", "141", - "142", "143", "144", "145", @@ -160,7 +150,6 @@ "158", "159", "160", - "161", "162", "163", "164", @@ -200,19 +189,11 @@ "198", "199", "200", - "201", "202", - "203", "204", "205", - "206", "207", - "208", - "209", - "210", "211", - "212", - "213", "214", "215", "216", diff --git a/parser/testdata/parse/postgres_regress/vacuum_parallel.metadata.json b/parser/testdata/parse/postgres_regress/vacuum_parallel.metadata.json index 5a08d01..ea3d6ea 100644 --- a/parser/testdata/parse/postgres_regress/vacuum_parallel.metadata.json +++ b/parser/testdata/parse/postgres_regress/vacuum_parallel.metadata.json @@ -7,8 +7,6 @@ "005", "006", "007", - "008", - "009", "010", "011", "012", diff --git a/parser/testdata/parse/postgres_regress/varchar.metadata.json b/parser/testdata/parse/postgres_regress/varchar.metadata.json index edb706f..eb5b802 100644 --- a/parser/testdata/parse/postgres_regress/varchar.metadata.json +++ b/parser/testdata/parse/postgres_regress/varchar.metadata.json @@ -9,18 +9,7 @@ "007", "008", "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", "017", - "018", - "019", - "020", - "021", - "022" + "018" ] } diff --git a/parser/testdata/parse/postgres_regress/window.metadata.json b/parser/testdata/parse/postgres_regress/window.metadata.json index a1f4321..d6adb2d 100644 --- a/parser/testdata/parse/postgres_regress/window.metadata.json +++ b/parser/testdata/parse/postgres_regress/window.metadata.json @@ -2,297 +2,53 @@ "todo": [ "001", "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", "074", - "075", - "076", "077", - "078", - "079", "080", - "081", - "082", "083", - "084", - "085", "086", - "087", - "088", "089", - "090", - "091", "092", "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", "123", "124", "125", - "126", - "127", "128", "129", "130", - "131", - "132", "133", "134", - "135", "136", "137", "138", - "139", - "140", - "141", - "142", - "143", - "144", "145", "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", - "165", "166", "167", - "168", - "169", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", "238", "239", - "240", "241", - "242", - "243", - "244", - "245", "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", "256", "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", "265", "266", - "267", "268", "269", "270", - "271", - "272", - "273", "274", - "275", "276", - "277", "278", - "279", "280", - "281", "282", "283", "284", "285", - "286", "287", "288", - "289", "290", - "291", "292", - "293", "294", "295", "296", @@ -308,11 +64,8 @@ "306", "307", "308", - "309", "310", "311", - "312", - "313", "314", "315", "316", @@ -323,68 +76,13 @@ "321", "322", "323", - "324", - "325", - "326", - "327", - "328", "329", "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", - "376", - "377", - "378", "379", "380", "381", "382", - "383", "384", - "385", - "386" + "385" ] } diff --git a/parser/testdata/parse/postgres_regress/with.metadata.json b/parser/testdata/parse/postgres_regress/with.metadata.json index b24b526..9462d84 100644 --- a/parser/testdata/parse/postgres_regress/with.metadata.json +++ b/parser/testdata/parse/postgres_regress/with.metadata.json @@ -1,22 +1,7 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", "006", - "007", "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", "018", "019", "020", @@ -26,165 +11,52 @@ "024", "025", "026", - "027", - "028", - "029", - "030", - "031", - "032", "033", - "034", - "035", - "036", "037", - "038", - "039", - "040", "041", "042", - "043", - "044", - "045", "046", "047", - "048", "049", "050", "051", "052", "053", "054", - "055", - "056", "057", - "058", - "059", "060", - "061", "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", "070", - "071", - "072", "073", "074", - "075", - "076", - "077", "078", - "079", - "080", "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", "097", "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", "109", "110", "111", - "112", "113", - "114", "115", - "116", "117", - "118", - "119", - "120", - "121", - "122", - "123", - "124", - "125", - "126", - "127", - "128", "129", "130", "131", - "132", - "133", - "134", - "135", - "136", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", "149", "150", - "151", - "152", - "153", - "154", "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", - "163", - "164", "165", - "166", "167", - "168", "169", - "170", "171", - "172", "173", "174", - "175", "176", "177", - "178", "179", - "180", "181", "182", "183", - "184", - "185", "186", "187", "188", @@ -193,22 +65,15 @@ "191", "192", "193", - "194", "195", - "196", "197", - "198", "199", - "200", "201", - "202", "203", - "204", "205", "206", "207", "208", - "209", "210", "211", "212", @@ -220,39 +85,29 @@ "218", "219", "220", - "221", "222", "223", - "224", "225", "226", - "227", "228", "229", "230", "231", "232", "233", - "234", - "235", "236", - "237", - "238", "239", "240", "241", "242", "243", - "244", "245", "246", "247", - "248", "249", "250", "251", "252", - "253", "254", "255", "256", @@ -262,13 +117,9 @@ "260", "261", "262", - "263", "264", - "265", "266", - "267", "268", - "269", "270", "271", "272", @@ -287,11 +138,9 @@ "285", "286", "287", - "288", "289", "290", "291", - "292", "293" ] } diff --git a/parser/testdata/parse/postgres_regress/write_parallel.metadata.json b/parser/testdata/parse/postgres_regress/write_parallel.metadata.json index edb706f..39897e0 100644 --- a/parser/testdata/parse/postgres_regress/write_parallel.metadata.json +++ b/parser/testdata/parse/postgres_regress/write_parallel.metadata.json @@ -9,7 +9,6 @@ "007", "008", "009", - "010", "011", "012", "013", diff --git a/parser/testdata/parse/postgres_regress/xid.metadata.json b/parser/testdata/parse/postgres_regress/xid.metadata.json index 7852793..fd0d4f2 100644 --- a/parser/testdata/parse/postgres_regress/xid.metadata.json +++ b/parser/testdata/parse/postgres_regress/xid.metadata.json @@ -1,88 +1,25 @@ { "todo": [ - "001", - "002", - "003", - "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", "027", "028", - "029", "030", "031", "032", - "033", - "034", - "035", - "036", - "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", "045", "046", "047", "048", "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", "061", - "062", - "063", - "064", "065", "066", - "067", "068", "069", - "070", "071", "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", "080", "081", "082", - "083", "084" ] } diff --git a/parser/testdata/parse/postgres_regress/xml.metadata.json b/parser/testdata/parse/postgres_regress/xml.metadata.json index a6ce2f7..639ee39 100644 --- a/parser/testdata/parse/postgres_regress/xml.metadata.json +++ b/parser/testdata/parse/postgres_regress/xml.metadata.json @@ -4,135 +4,15 @@ "002", "003", "004", - "005", - "006", - "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "027", - "028", - "029", - "030", - "031", - "032", - "033", - "034", "035", - "036", "037", - "038", - "039", - "040", - "041", - "042", - "043", - "044", - "045", - "046", - "047", - "048", - "049", - "050", - "051", - "052", - "053", - "054", - "055", - "056", - "057", - "058", - "059", - "060", - "061", - "062", - "063", - "064", - "065", - "066", - "067", - "068", - "069", - "070", - "071", - "072", - "073", - "074", - "075", - "076", - "077", - "078", - "079", - "080", - "081", - "082", - "083", - "084", - "085", - "086", - "087", - "088", - "089", - "090", - "091", - "092", - "093", - "094", - "095", - "096", - "097", - "098", - "099", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", "120", "121", "122", "123", - "124", "125", "126", "127", - "128", - "129", - "130", - "131", - "132", - "133", "134", "135", "136", @@ -144,131 +24,33 @@ "142", "143", "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - "160", - "161", - "162", "163", - "164", - "165", - "166", - "167", - "168", - "169", "170", "171", "172", "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", "184", "185", - "186", - "187", - "188", - "189", - "190", "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", "214", "215", - "216", "217", - "218", "219", "220", - "221", - "222", - "223", "224", - "225", - "226", - "227", "228", "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", "242", - "243", "244", "245", "246", "247", - "248", - "249", "250", - "251", - "252", - "253", "254", "255", "256", "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "269", - "270" + "258" ] } diff --git a/parser/testdata/parse/postgres_regress/xmlmap.metadata.json b/parser/testdata/parse/postgres_regress/xmlmap.metadata.json index 32e0be1..0210985 100644 --- a/parser/testdata/parse/postgres_regress/xmlmap.metadata.json +++ b/parser/testdata/parse/postgres_regress/xmlmap.metadata.json @@ -7,38 +7,10 @@ "005", "006", "007", - "008", - "009", - "010", - "011", - "012", - "013", - "014", - "015", - "016", - "017", - "018", - "019", - "020", - "021", - "022", - "023", - "024", "025", - "026", - "027", "028", - "029", - "030", - "031", - "032", - "033", - "034", - "035", "036", "037", - "038", - "039", - "040" + "038" ] }