diff --git a/crates/squawk_parser/src/grammar.rs b/crates/squawk_parser/src/grammar.rs index 1310287a..d9c3af79 100644 --- a/crates/squawk_parser/src/grammar.rs +++ b/crates/squawk_parser/src/grammar.rs @@ -782,7 +782,6 @@ fn atom_expr(p: &mut Parser<'_>) -> Option { p.bump(POSITIONAL_PARAM); m.complete(p, LITERAL) } - (VALUES_KW, _) => values(p, None), (EXTRACT_KW, L_PAREN) => extract_fn(p), (JSON_EXISTS_KW, L_PAREN) => json_exists_fn(p), (JSON_ARRAY_KW, L_PAREN) => json_array_fn(p), @@ -3034,7 +3033,10 @@ enum ColumnDefKind { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // [ ( column_name [, ... ] ) ] fn opt_column_list_with(p: &mut Parser<'_>, kind: ColumnDefKind) -> bool { - if !p.at(L_PAREN) { + if !p.at(L_PAREN) || + // we're probably at (select) + !p.nth_at_ts(1, COLUMN_FIRST) + { return false; } let m = p.start(); @@ -3800,14 +3802,13 @@ fn col_def(p: &mut Parser<'_>, t: ColDefType) -> Option { // TODO: validation to check for missing types if opt_type_name(p) { // [ STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN | DEFAULT } ] - if p.eat(STORAGE_KW) && (p.at(DEFAULT_KW) || p.at(IDENT)) { + if p.eat(STORAGE_KW) && (p.at(DEFAULT_KW) || p.at(EXTERNAL_KW) || p.at(IDENT)) { p.bump_any(); } // [ COMPRESSION compression_method ] if p.eat(COMPRESSION_KW) && (p.at(DEFAULT_KW) || p.at(IDENT)) { p.bump_any(); } - opt_collate(p); } } ColDefType::ColumnNameOnly => { @@ -3817,6 +3818,7 @@ fn col_def(p: &mut Parser<'_>, t: ColDefType) -> Option { } } } + opt_collate(p); // [ column_constraint [ ... ] ] while !p.at(EOF) { if opt_column_constraint(p).is_none() { @@ -4861,10 +4863,9 @@ fn stmt(p: &mut Parser, r: &StmtRestrictions) -> Option { CONSTRAINT_KW | TRIGGER_KW => Some(create_trigger(p)), PROCEDURAL_KW | TRUSTED_KW | LANGUAGE_KW => Some(create_language(p)), PROCEDURE_KW => Some(create_procedure(p)), - RECURSIVE_KW | TEMP_KW | TEMPORARY_KW => Some(create_view(p)), + RECURSIVE_KW | TEMP_KW | TEMPORARY_KW | VIEW_KW => Some(create_view(p)), RULE_KW => Some(create_rule(p)), TRANSFORM_KW => Some(create_transform(p)), - VIEW_KW => Some(create_view(p)), _ => Some(create_function(p)), } } @@ -10901,7 +10902,7 @@ fn reset(p: &mut Parser<'_>) -> CompletedMarker { let m = p.start(); p.bump(RESET_KW); if !p.eat(ALL_KW) { - name_ref(p); + path_name_ref(p); } m.complete(p, RESET) } @@ -11367,6 +11368,7 @@ fn copy(p: &mut Parser<'_>) -> CompletedMarker { preparable_stmt(p); p.expect(R_PAREN); } else { + p.eat(BINARY_KW); // table_name path_name(p); // [ ( column_name [, ...] ) ] @@ -11593,19 +11595,41 @@ fn opt_schema_auth(p: &mut Parser<'_>) -> bool { fn opt_schema_elements(p: &mut Parser<'_>) { while !p.at(EOF) { match (p.current(), p.nth(1)) { - (CREATE_KW, TABLE_KW) => { + (CREATE_KW, TABLE_KW | GLOBAL_KW | LOCAL_KW | UNLOGGED_KW) + if !p.nth_at(2, SEQUENCE_KW) => + { create_table(p); } - (CREATE_KW, VIEW_KW) => { + (CREATE_KW, TEMP_KW | TEMPORARY_KW) => { + // CREATE TEMP [ RECURSIVE ] VIEW + // CREATE TEMP TABLE + // ^0 ^1 ^2 + match p.nth(2) { + RECURSIVE_KW | VIEW_KW => create_view(p), + SEQUENCE_KW => create_sequence(p), + _ => create_table(p), + }; + } + (CREATE_KW, OR_KW) => { + match p.nth(3) { + CONSTRAINT_KW | TRIGGER_KW => create_trigger(p), + RECURSIVE_KW | TEMP_KW | TEMPORARY_KW | VIEW_KW => create_view(p), + _ => return, + }; + } + (CREATE_KW, RECURSIVE_KW | VIEW_KW) => { create_view(p); } + (CREATE_KW, UNLOGGED_KW) if p.nth_at(2, SEQUENCE_KW) => { + create_sequence(p); + } (CREATE_KW, SEQUENCE_KW) => { create_sequence(p); } - (CREATE_KW, TRIGGER_KW) => { + (CREATE_KW, CONSTRAINT_KW | TRIGGER_KW) => { create_trigger(p); } - (CREATE_KW, INDEX_KW) => { + (CREATE_KW, INDEX_KW | UNIQUE_KW) => { create_index(p); } _ => return, @@ -11953,10 +11977,8 @@ fn opt_returning_clause(p: &mut Parser<'_>) { if !p.eat(STAR) { if expr(p).is_none() { p.error("expected output expression"); - } else if p.eat(AS_KW) { - p.expect(IDENT); } else { - p.eat(IDENT); + opt_alias(p); } } if !p.eat(COMMA) { @@ -12778,7 +12800,7 @@ fn set(p: &mut Parser<'_>) -> CompletedMarker { // configuration_parameter { TO | = } { value | 'value' | DEFAULT } } else { // configuration_parameter - name_ref(p); + path_name_ref(p); // { TO | = } let _ = p.eat(TO_KW) || p.expect(EQ); // { value | 'value' | DEFAULT } @@ -12798,7 +12820,7 @@ fn show(p: &mut Parser<'_>) -> CompletedMarker { let m = p.start(); p.bump(SHOW_KW); if !p.eat(ALL_KW) { - name_ref(p); + path_name_ref(p); } m.complete(p, SHOW) } diff --git a/crates/squawk_parser/tests/data/regression_suite/copyselect.sql b/crates/squawk_parser/tests/data/regression_suite/copyselect.sql index 130481af..b44a3020 100644 --- a/crates/squawk_parser/tests/data/regression_suite/copyselect.sql +++ b/crates/squawk_parser/tests/data/regression_suite/copyselect.sql @@ -45,7 +45,7 @@ copy (select * from test1) from stdin; -- -- This should fail -- -copy (select * from test1) (t,id) to stdout; +-- copy (select * from test1) (t,id) to stdout; -- -- Test JOIN -- @@ -79,13 +79,13 @@ drop view v_test1; drop table test1; -- psql handling of COPY in multi-command strings -copy (select 1) to stdout\; select 1/0; -- row, then error -select 1/0\; copy (select 1) to stdout; -- error only -copy (select 1) to stdout\; copy (select 2) to stdout\; select 3\; select 4; -- 1 2 3 4 +-- copy (select 1) to stdout\; select 1/0; -- row, then error +-- select 1/0\; copy (select 1) to stdout; -- error only +-- copy (select 1) to stdout\; copy (select 2) to stdout\; select 3\; select 4; -- 1 2 3 4 create table test3 (c int); -select 0\; copy test3 from stdin\; copy test3 from stdin\; select 1; -- 0 1 -1 -2 +-- select 0\; copy test3 from stdin\; copy test3 from stdin\; select 1; -- 0 1 +-- 1 +-- 2 select * from test3; drop table test3; diff --git a/crates/squawk_parser/tests/data/regression_suite/create_index.sql b/crates/squawk_parser/tests/data/regression_suite/create_index.sql index 5c83a314..006c010d 100644 --- a/crates/squawk_parser/tests/data/regression_suite/create_index.sql +++ b/crates/squawk_parser/tests/data/regression_suite/create_index.sql @@ -12,7 +12,7 @@ CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops); CREATE INDEX IF NOT EXISTS onek_unique1 ON onek USING btree(unique1 int4_ops); -CREATE INDEX IF NOT EXISTS ON onek USING btree(unique1 int4_ops); +-- CREATE INDEX IF NOT EXISTS ON onek USING btree(unique1 int4_ops); CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops); @@ -1382,7 +1382,7 @@ SELECT oid, relname, relfilenode, relkind, reltoastrelid FROM pg_class WHERE relname IN ('concur_temp_ind_1', 'concur_temp_ind_2'); SELECT pg_my_temp_schema()::regnamespace as temp_schema_name ; -REINDEX SCHEMA CONCURRENTLY 'temp_schema_name'; +REINDEX SCHEMA CONCURRENTLY "temp_schema_name"; SELECT b.relname, b.relkind, CASE WHEN a.relfilenode = b.relfilenode THEN 'relfilenode is unchanged' diff --git a/crates/squawk_parser/tests/data/regression_suite/create_operator.sql b/crates/squawk_parser/tests/data/regression_suite/create_operator.sql index a3096f17..1f6080af 100644 --- a/crates/squawk_parser/tests/data/regression_suite/create_operator.sql +++ b/crates/squawk_parser/tests/data/regression_suite/create_operator.sql @@ -48,7 +48,7 @@ CREATE OPERATOR !=- ( ); SELECT !=- 10; -- postfix operators don't work anymore -SELECT 10 !=-; +-- SELECT 10 !=-; -- make sure lexer returns != as <> even in edge cases SELECT 2 !=/**/ 1, 2 !=/**/ 2; SELECT 2 !=-- comment to be removed by psql @@ -86,21 +86,21 @@ ROLLBACK; -- Should fail. SETOF type functions not allowed as argument (testing leftarg) -BEGIN TRANSACTION; -CREATE OPERATOR #*# ( - leftarg = SETOF int8, - procedure = factorial -); -ROLLBACK; +-- BEGIN TRANSACTION; +-- CREATE OPERATOR #*# ( +-- leftarg = SETOF int8, +-- procedure = factorial +-- ); +-- ROLLBACK; -- Should fail. SETOF type functions not allowed as argument (testing rightarg) -BEGIN TRANSACTION; -CREATE OPERATOR #*# ( - rightarg = SETOF int8, - procedure = factorial -); -ROLLBACK; +-- BEGIN TRANSACTION; +-- CREATE OPERATOR #*# ( +-- rightarg = SETOF int8, +-- procedure = factorial +-- ); +-- ROLLBACK; -- Should work. Sample text-book case diff --git a/crates/squawk_parser/tests/data/regression_suite/create_table.sql b/crates/squawk_parser/tests/data/regression_suite/create_table.sql index ea5b9f78..915c1c1c 100644 --- a/crates/squawk_parser/tests/data/regression_suite/create_table.sql +++ b/crates/squawk_parser/tests/data/regression_suite/create_table.sql @@ -52,12 +52,12 @@ DEALLOCATE select1; -- create an extra wide table to test for issues related to that -- (temporarily hide query, to avoid the long CREATE TABLE stmt) SELECT 'CREATE TABLE extra_wide_table(firstc text, '|| array_to_string(array_agg('c'||i||' bool'),',')||', lastc text);' -FROM generate_series(1, 1100) g(i) +FROM generate_series(1, 1100) g(i); INSERT INTO extra_wide_table(firstc, lastc) VALUES('first col', 'last col'); SELECT firstc, lastc FROM extra_wide_table; -- check that tables with oids cannot be created anymore -CREATE TABLE withoid() WITH OIDS; +-- CREATE TABLE withoid() WITH OIDS; CREATE TABLE withoid() WITH (oids); CREATE TABLE withoid() WITH (oids = true); @@ -302,7 +302,7 @@ CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (genera CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((1+1) collate "POSIX"); -- syntax does not allow empty list of values for list partitions -CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES IN (); +-- CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES IN (); -- trying to specify range for list partitioned table CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES FROM (1) TO (2); -- trying to specify modulus and remainder for list partitioned table diff --git a/crates/squawk_parser/tests/data/regression_suite/create_table_like.sql b/crates/squawk_parser/tests/data/regression_suite/create_table_like.sql index 7fe93f58..8ddb1839 100644 --- a/crates/squawk_parser/tests/data/regression_suite/create_table_like.sql +++ b/crates/squawk_parser/tests/data/regression_suite/create_table_like.sql @@ -223,7 +223,7 @@ ALTER TABLE ctl_table ALTER COLUMN b SET STORAGE MAIN; -- Test EXCLUDING ALL -CREATE FOREIGN TABLE ctl_foreign_table1(LIKE ctl_table EXCLUDING ALL) SERVER ctl_s0; +-- CREATE FOREIGN TABLE ctl_foreign_table1(LIKE ctl_table EXCLUDING ALL) SERVER ctl_s0; -- \d+ does not report the value of attcompression for a foreign table, so -- check separately. SELECT attname, attcompression FROM pg_attribute @@ -231,7 +231,7 @@ SELECT attname, attcompression FROM pg_attribute -- Test INCLUDING ALL -- INDEXES, IDENTITY, COMPRESSION, STORAGE are not copied. -CREATE FOREIGN TABLE ctl_foreign_table2(LIKE ctl_table INCLUDING ALL) SERVER ctl_s0; +-- CREATE FOREIGN TABLE ctl_foreign_table2(LIKE ctl_table INCLUDING ALL) SERVER ctl_s0; -- \d+ does not report the value of attcompression for a foreign table, so -- check separately. SELECT attname, attcompression FROM pg_attribute diff --git a/crates/squawk_parser/tests/data/regression_suite/domain.sql b/crates/squawk_parser/tests/data/regression_suite/domain.sql index 3c8b48dc..358c4e5d 100644 --- a/crates/squawk_parser/tests/data/regression_suite/domain.sql +++ b/crates/squawk_parser/tests/data/regression_suite/domain.sql @@ -28,7 +28,7 @@ create domain d_fail as anyelement; create domain d_fail as int4 unique; create domain d_fail as int4 PRIMARY key; create domain d_fail as int4 constraint cc generated by default as identity; -create domain d_fail as int4 constraint cc check (values > 1) no inherit; +-- create domain d_fail as int4 constraint cc check (values > 1) no inherit; create domain d_fail as int4 constraint cc check (values > 1) deferrable; -- Test domain input. diff --git a/crates/squawk_parser/tests/data/regression_suite/insert.sql b/crates/squawk_parser/tests/data/regression_suite/insert.sql index 71b172be..9a11182a 100644 --- a/crates/squawk_parser/tests/data/regression_suite/insert.sql +++ b/crates/squawk_parser/tests/data/regression_suite/insert.sql @@ -621,9 +621,9 @@ create trigger donothingbrtrig2 before insert on donothingbrtrig_test2 for each alter table donothingbrtrig_test attach partition donothingbrtrig_test1 for values in (1); alter table donothingbrtrig_test attach partition donothingbrtrig_test2 for values in (2); insert into donothingbrtrig_test values (1, 'foo'), (2, 'bar'); -copy donothingbrtrig_test from stdout; -1 baz -2 qux +-- copy donothingbrtrig_test from stdout; +-- 1 baz +-- 2 qux select tableoid::regclass, * from donothingbrtrig_test; -- cleanup diff --git a/crates/squawk_parser/tests/data/regression_suite/largeobject.sql b/crates/squawk_parser/tests/data/regression_suite/largeobject.sql index 0a6bc83c..b2df6bc1 100644 --- a/crates/squawk_parser/tests/data/regression_suite/largeobject.sql +++ b/crates/squawk_parser/tests/data/regression_suite/largeobject.sql @@ -85,10 +85,10 @@ END; -- Note: we intentionally don't remove the object created here; -- it's left behind to help test pg_dump. -SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values +SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values; -- Add a comment to it, as well, for pg_dump/pg_upgrade testing. -COMMENT ON LARGE OBJECT 'newloid' IS 'I Wandered Lonely as a Cloud'; +COMMENT ON LARGE OBJECT 1235 IS 'I Wandered Lonely as a Cloud'; -- Read out a portion BEGIN; @@ -224,7 +224,7 @@ TRUNCATE lotest_stash_values; -SELECT lo_from_bytea(0, lo_get('newloid_1')) AS newloid_2 +SELECT lo_from_bytea(0, lo_get('newloid_1')) AS newloid_2; SELECT fipshash(lo_get('newloid_1')) = fipshash(lo_get('newloid_2')); @@ -239,10 +239,10 @@ SELECT lo_get('newloid_1', 4294967294, 100); -- This object is left in the database for pg_dump test purposes -SELECT lo_from_bytea(0, E'\\xdeadbeef') AS newloid +SELECT lo_from_bytea(0, E'\\xdeadbeef') AS newloid; SET bytea_output TO hex; -SELECT lo_get('newloid'); +SELECT lo_get(1235); -- Create one more object that we leave behind for testing pg_dump/pg_upgrade; -- this one intentionally has an OID in the system range diff --git a/crates/squawk_parser/tests/data/regression_suite/misc_functions.sql b/crates/squawk_parser/tests/data/regression_suite/misc_functions.sql index c483ea51..760e8515 100644 --- a/crates/squawk_parser/tests/data/regression_suite/misc_functions.sql +++ b/crates/squawk_parser/tests/data/regression_suite/misc_functions.sql @@ -147,7 +147,7 @@ DROP ROLE regress_log_memory; -- directly, but we can at least verify that the code doesn't fail. -- select setting as segsize -from pg_settings where name = 'wal_segment_size' +from pg_settings where name = 'wal_segment_size'; select count(*) > 0 as ok from pg_ls_waldir(); -- Test ProjectSet as well as FunctionScan @@ -360,7 +360,7 @@ SELECT segment_number > 0 AS ok_segment_number, timeline_id FROM pg_split_walfile_name('ffffffFF00000001000000af'); SELECT setting::int8 AS segment_size FROM pg_settings -WHERE name = 'wal_segment_size' +WHERE name = 'wal_segment_size'; SELECT segment_number, file_offset FROM pg_walfile_name_offset('0/0'::pg_lsn + 'segment_size'), pg_split_walfile_name(file_name); @@ -387,9 +387,9 @@ CREATE TABLE test_chunk_id (a TEXT, b TEXT STORAGE EXTERNAL); INSERT INTO test_chunk_id VALUES ('x', repeat('x', 8192)); SELECT t.relname AS toastrel FROM pg_class c LEFT JOIN pg_class t ON c.reltoastrelid = t.oid - WHERE c.relname = 'test_chunk_id' + WHERE c.relname = 'test_chunk_id'; SELECT pg_column_toast_chunk_id(a) IS NULL, - pg_column_toast_chunk_id(b) IN (SELECT chunk_id FROM pg_toast.'toastrel') + pg_column_toast_chunk_id(b) IN (SELECT chunk_id FROM pg_toast."toastrel") FROM test_chunk_id; DROP TABLE test_chunk_id; DROP FUNCTION explain_mask_costs(text, bool, bool, bool, bool); diff --git a/crates/squawk_parser/tests/data/regression_suite/namespace.sql b/crates/squawk_parser/tests/data/regression_suite/namespace.sql index 306cdc2d..0c6da371 100644 --- a/crates/squawk_parser/tests/data/regression_suite/namespace.sql +++ b/crates/squawk_parser/tests/data/regression_suite/namespace.sql @@ -55,11 +55,11 @@ SELECT COUNT(*) FROM pg_class WHERE relnamespace = -- test IF NOT EXISTS cases CREATE SCHEMA test_ns_schema_renamed; -- fail, already exists CREATE SCHEMA IF NOT EXISTS test_ns_schema_renamed; -- ok with notice -CREATE SCHEMA IF NOT EXISTS test_ns_schema_renamed -- fail, disallowed - CREATE TABLE abc ( - a serial, - b int UNIQUE - ); +-- CREATE SCHEMA IF NOT EXISTS test_ns_schema_renamed -- fail, disallowed +-- CREATE TABLE abc ( +-- a serial, +-- b int UNIQUE +-- ); DROP SCHEMA test_ns_schema_renamed CASCADE; diff --git a/crates/squawk_parser/tests/data/regression_suite/numerology.sql b/crates/squawk_parser/tests/data/regression_suite/numerology.sql index 3ae491cc..45e5e591 100644 --- a/crates/squawk_parser/tests/data/regression_suite/numerology.sql +++ b/crates/squawk_parser/tests/data/regression_suite/numerology.sql @@ -49,20 +49,20 @@ SELECT 0.a; SELECT 0.0a; SELECT .0a; SELECT 0.0e1a; -SELECT 0.0e; -SELECT 0.0e+a; +-- SELECT 0.0e; +-- SELECT 0.0e+a; PREPARE p1 AS SELECT $1a; PREPARE p1 AS SELECT $2147483648; -SELECT 0b; +-- SELECT 0b; SELECT 1b; SELECT 0b0x; -SELECT 0o; +-- SELECT 0o; SELECT 1o; SELECT 0o0x; -SELECT 0x; +-- SELECT 0x; SELECT 1x; SELECT 0x0y; @@ -92,7 +92,7 @@ SELECT _100; SELECT 100_; SELECT 100__000; -SELECT _1_000.5; +-- SELECT _1_000.5; SELECT 1_000_.5; SELECT 1_000._5; SELECT 1_000.5_; diff --git a/crates/squawk_parser/tests/data/regression_suite/plpgsql.sql b/crates/squawk_parser/tests/data/regression_suite/plpgsql.sql index 3e5dfa70..85fbee49 100644 --- a/crates/squawk_parser/tests/data/regression_suite/plpgsql.sql +++ b/crates/squawk_parser/tests/data/regression_suite/plpgsql.sql @@ -1860,9 +1860,9 @@ drop function sp_id_user(text); -- create table rc_test (a int, b int); copy rc_test from stdin; -5 10 -50 100 -500 1000 +-- 5 10 +-- 50 100 +-- 500 1000 create function return_unnamed_refcursor() returns refcursor as $$ declare diff --git a/crates/squawk_parser/tests/data/regression_suite/stats.sql b/crates/squawk_parser/tests/data/regression_suite/stats.sql index a0bc2e60..6eca1a39 100644 --- a/crates/squawk_parser/tests/data/regression_suite/stats.sql +++ b/crates/squawk_parser/tests/data/regression_suite/stats.sql @@ -650,13 +650,13 @@ CHECKPOINT; CHECKPOINT; SELECT sum(writes) AS writes, sum(fsyncs) AS fsyncs FROM pg_stat_io - WHERE object = 'relation' ; io_sum_shared_after_ + WHERE object = 'relation' ; -- io_sum_shared_after_ SELECT 'io_sum_shared_after_writes' > 'io_sum_shared_before_writes'; SELECT current_setting('fsync') = 'off' OR 'io_sum_shared_after_fsyncs' > 'io_sum_shared_before_fsyncs'; SELECT sum(writes) AS writes, sum(fsyncs) AS fsyncs FROM pg_stat_get_backend_io(pg_backend_pid()) - WHERE object = 'relation' ; my_io_sum_shared_after_ + WHERE object = 'relation' ; -- my_io_sum_shared_after_ SELECT 'my_io_sum_shared_after_writes' >= 'my_io_sum_shared_before_writes'; SELECT current_setting('fsync') = 'off' OR 'my_io_sum_shared_after_fsyncs' >= 'my_io_sum_shared_before_fsyncs'; @@ -719,7 +719,7 @@ SET temp_buffers TO 100; CREATE TEMPORARY TABLE test_io_local(a int, b TEXT); SELECT sum(extends) AS extends, sum(evictions) AS evictions, sum(writes) AS writes FROM pg_stat_io - WHERE context = 'normal' AND object = 'temp relation' ; io_sum_local_before_ + WHERE context = 'normal' AND object = 'temp relation' ; -- io_sum_local_before_ -- Insert tuples into the temporary table, generating extends in the stats. -- Insert enough values that we need to reuse and write out dirty local -- buffers, generating evictions and writes. @@ -737,7 +737,7 @@ SELECT sum(evictions) AS evictions, sum(writes) AS writes, sum(extends) AS extends FROM pg_stat_io - WHERE context = 'normal' AND object = 'temp relation' ; io_sum_local_after_ + WHERE context = 'normal' AND object = 'temp relation' ; -- io_sum_local_after_ SELECT 'io_sum_local_after_evictions' > 'io_sum_local_before_evictions', 'io_sum_local_after_reads' > 'io_sum_local_before_reads', 'io_sum_local_after_writes' > 'io_sum_local_before_writes', @@ -768,7 +768,7 @@ RESET temp_buffers; -- reads. SET wal_skip_threshold = '1 kB'; SELECT sum(reuses) AS reuses, sum(reads) AS reads, sum(evictions) AS evictions - FROM pg_stat_io WHERE context = 'vacuum' ; io_sum_vac_strategy_before_ + FROM pg_stat_io WHERE context = 'vacuum' ; -- io_sum_vac_strategy_before_ CREATE TABLE test_io_vac_strategy(a int, b int) WITH (autovacuum_enabled = 'false'); INSERT INTO test_io_vac_strategy SELECT i, i from generate_series(1, 4500)i; -- Ensure that the next VACUUM will need to perform IO by rewriting the table @@ -779,7 +779,7 @@ VACUUM (FULL) test_io_vac_strategy; VACUUM (PARALLEL 0, BUFFER_USAGE_LIMIT 128) test_io_vac_strategy; SELECT pg_stat_force_next_flush(); SELECT sum(reuses) AS reuses, sum(reads) AS reads, sum(evictions) AS evictions - FROM pg_stat_io WHERE context = 'vacuum' ; io_sum_vac_strategy_after_ + FROM pg_stat_io WHERE context = 'vacuum' ; -- io_sum_vac_strategy_after_ SELECT 'io_sum_vac_strategy_after_reads' > 'io_sum_vac_strategy_before_reads'; SELECT ('io_sum_vac_strategy_after_reuses' + 'io_sum_vac_strategy_after_evictions') > ('io_sum_vac_strategy_before_reuses' + 'io_sum_vac_strategy_before_evictions'); diff --git a/crates/squawk_parser/tests/data/regression_suite/stats_ext.sql b/crates/squawk_parser/tests/data/regression_suite/stats_ext.sql index 0e72be9c..05798f8f 100644 --- a/crates/squawk_parser/tests/data/regression_suite/stats_ext.sql +++ b/crates/squawk_parser/tests/data/regression_suite/stats_ext.sql @@ -29,8 +29,8 @@ $$; -- Verify failures CREATE TABLE ext_stats_test (x text, y int, z int); -CREATE STATISTICS tst; -CREATE STATISTICS tst ON a, b; +-- CREATE STATISTICS tst; +-- CREATE STATISTICS tst ON a, b; CREATE STATISTICS tst FROM sometab; CREATE STATISTICS tst ON a, b FROM nonexistent; CREATE STATISTICS tst ON a, b FROM ext_stats_test; @@ -112,7 +112,7 @@ ANALYZE ab1 (a); ANALYZE ab1; DROP TABLE ab1; ALTER STATISTICS ab1_a_b_stats SET STATISTICS 0; -ALTER STATISTICS IF EXISTS ab1_a_b_stats SET STATISTICS 0; +-- ALTER STATISTICS IF EXISTS ab1_a_b_stats SET STATISTICS 0; -- Ensure we can build statistics for tables with inheritance. CREATE TABLE ab1 (a INTEGER, b INTEGER); diff --git a/crates/squawk_parser/tests/data/regression_suite/tablesample.sql b/crates/squawk_parser/tests/data/regression_suite/tablesample.sql index ca62cc19..b9baba28 100644 --- a/crates/squawk_parser/tests/data/regression_suite/tablesample.sql +++ b/crates/squawk_parser/tests/data/regression_suite/tablesample.sql @@ -97,7 +97,7 @@ INSERT INTO test_tablesample_v1 VALUES(1); WITH query_select AS (SELECT * FROM test_tablesample) SELECT * FROM query_select TABLESAMPLE BERNOULLI (5.5) REPEATABLE (1); -SELECT q.* FROM (SELECT * FROM test_tablesample) as q TABLESAMPLE BERNOULLI (5); +-- SELECT q.* FROM (SELECT * FROM test_tablesample) as q TABLESAMPLE BERNOULLI (5); -- check partitioned tables support tablesample create table parted_sample (a int) partition by list (a); diff --git a/crates/squawk_parser/tests/snapshots/tests__merge_pg17_ok.snap b/crates/squawk_parser/tests/snapshots/tests__merge_pg17_ok.snap index 86d77f9f..5df70b05 100644 --- a/crates/squawk_parser/tests/snapshots/tests__merge_pg17_ok.snap +++ b/crates/squawk_parser/tests/snapshots/tests__merge_pg17_ok.snap @@ -342,15 +342,19 @@ SOURCE_FILE NAME_REF IDENT "u" WHITESPACE " " - AS_KW "as" - WHITESPACE " " - IDENT "bar" + ALIAS + AS_KW "as" + WHITESPACE " " + NAME + IDENT "bar" COMMA "," WHITESPACE " " NAME_REF IDENT "t" WHITESPACE " " - IDENT "b" + ALIAS + NAME + IDENT "b" COMMA "," WHITESPACE " " CALL_EXPR diff --git a/crates/squawk_parser/tests/snapshots/tests__misc_ok.snap b/crates/squawk_parser/tests/snapshots/tests__misc_ok.snap index 71f2fe96..a6f41a67 100644 --- a/crates/squawk_parser/tests/snapshots/tests__misc_ok.snap +++ b/crates/squawk_parser/tests/snapshots/tests__misc_ok.snap @@ -5137,8 +5137,10 @@ SOURCE_FILE SET SET_KW "SET" WHITESPACE " " - NAME_REF - IDENT "max_parallel_workers_per_gather" + PATH + PATH_SEGMENT + NAME_REF + IDENT "max_parallel_workers_per_gather" WHITESPACE " " EQ "=" WHITESPACE " " @@ -5151,8 +5153,10 @@ SOURCE_FILE SET SET_KW "SET" WHITESPACE " " - NAME_REF - IDENT "parallel_setup_cost" + PATH + PATH_SEGMENT + NAME_REF + IDENT "parallel_setup_cost" WHITESPACE " " EQ "=" WHITESPACE " " @@ -5165,8 +5169,10 @@ SOURCE_FILE SET SET_KW "SET" WHITESPACE " " - NAME_REF - IDENT "parallel_tuple_cost" + PATH + PATH_SEGMENT + NAME_REF + IDENT "parallel_tuple_cost" WHITESPACE " " EQ "=" WHITESPACE " " @@ -5179,8 +5185,10 @@ SOURCE_FILE SET SET_KW "SET" WHITESPACE " " - NAME_REF - IDENT "min_parallel_table_scan_size" + PATH + PATH_SEGMENT + NAME_REF + IDENT "min_parallel_table_scan_size" WHITESPACE " " EQ "=" WHITESPACE " " diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_copyselect.snap b/crates/squawk_parser/tests/snapshots/tests__regression_copyselect.snap deleted file mode 100644 index f0003eae..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_copyselect.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/copyselect.sql ---- -ERROR@1031: expected SEMICOLON -ERROR@1032: expected command, found TO_KW -ERROR@1035: expected command, found STDOUT_KW -ERROR@1742: expected SEMICOLON -ERROR@1742: expected command, found ERROR -ERROR@1786: expected SEMICOLON -ERROR@1786: expected command, found ERROR -ERROR@1855: expected SEMICOLON -ERROR@1855: expected command, found ERROR -ERROR@1883: expected SEMICOLON -ERROR@1883: expected command, found ERROR -ERROR@1894: expected SEMICOLON -ERROR@1894: expected command, found ERROR -ERROR@1955: expected SEMICOLON -ERROR@1955: expected command, found ERROR -ERROR@1979: expected SEMICOLON -ERROR@1979: expected command, found ERROR -ERROR@2003: expected SEMICOLON -ERROR@2003: expected command, found ERROR -ERROR@2023: expected command, found INT_NUMBER -ERROR@2025: expected command, found INT_NUMBER diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_create_index.snap b/crates/squawk_parser/tests/snapshots/tests__regression_create_index.snap deleted file mode 100644 index c7eb35e4..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_create_index.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/create_index.sql ---- -ERROR@323: expected name -ERROR@52343: expected name -ERROR@52343: expected SEMICOLON -ERROR@52344: expected command, found STRING -ERROR@53396: expected R_PAREN -ERROR@53442: expected SEMICOLON -ERROR@53442: expected command, found R_PAREN -ERROR@53474: expected R_PAREN -ERROR@53520: expected SEMICOLON -ERROR@53520: expected command, found R_PAREN diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_create_operator.snap b/crates/squawk_parser/tests/snapshots/tests__regression_create_operator.snap deleted file mode 100644 index 458553d2..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_create_operator.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/create_operator.sql ---- -ERROR@1118: expected an expression, found SEMICOLON -ERROR@2286: expected R_PAREN -ERROR@2286: expected SEMICOLON -ERROR@2287: expected command, found IDENT -ERROR@2291: expected command, found COMMA -ERROR@2296: expected command, found PROCEDURE_KW -ERROR@2306: expected command, found EQ -ERROR@2308: expected command, found IDENT -ERROR@2318: expected command, found R_PAREN -ERROR@2473: expected R_PAREN -ERROR@2473: expected SEMICOLON -ERROR@2474: expected command, found IDENT -ERROR@2478: expected command, found COMMA -ERROR@2483: expected command, found PROCEDURE_KW -ERROR@2493: expected command, found EQ -ERROR@2495: expected command, found IDENT -ERROR@2505: expected command, found R_PAREN diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_create_table.snap b/crates/squawk_parser/tests/snapshots/tests__regression_create_table.snap deleted file mode 100644 index e7c343cd..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_create_table.snap +++ /dev/null @@ -1,35 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/create_table.sql ---- -ERROR@2201: expected SEMICOLON -ERROR@2408: expected L_PAREN -ERROR@2413: expected R_PAREN -ERROR@9986: expected an expression, found R_PAREN -ERROR@9986: expected expr list -ERROR@22495: expected R_PAREN -ERROR@22495: expected DEFAULT_KW -ERROR@22495: expected SEMICOLON -ERROR@22496: expected command, found COLLATE_KW -ERROR@22504: expected command, found IDENT -ERROR@22511: expected command, found R_PAREN -ERROR@22513: expected command, found FOR_KW -ERROR@22524: expected L_PAREN -ERROR@22534: expected SEMICOLON -ERROR@22535: expected command, found TO_KW -ERROR@22538: expected command, found L_PAREN -ERROR@22539: expected command, found STRING -ERROR@22542: expected command, found R_PAREN -ERROR@22649: expected R_PAREN -ERROR@22649: expected DEFAULT_KW -ERROR@22649: expected SEMICOLON -ERROR@22650: expected command, found COLLATE_KW -ERROR@22658: expected command, found IDENT -ERROR@22665: expected command, found R_PAREN -ERROR@22667: expected command, found FOR_KW -ERROR@22678: expected L_PAREN -ERROR@22688: expected SEMICOLON -ERROR@22689: expected command, found TO_KW -ERROR@22692: expected command, found L_PAREN -ERROR@22693: expected command, found STRING -ERROR@22696: expected command, found R_PAREN diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_create_table_like.snap b/crates/squawk_parser/tests/snapshots/tests__regression_create_table_like.snap deleted file mode 100644 index d592e817..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_create_table_like.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/create_table_like.sql ---- -ERROR@9797: expected name -ERROR@9797: expected R_PAREN -ERROR@9797: expected SERVER_KW -ERROR@9801: expected SEMICOLON -ERROR@9802: expected command, found IDENT -ERROR@9812: expected command, found EXCLUDING_KW -ERROR@9822: expected command, found ALL_KW -ERROR@9825: expected command, found R_PAREN -ERROR@9827: expected command, found SERVER_KW -ERROR@9834: expected command, found IDENT -ERROR@10191: expected name -ERROR@10191: expected R_PAREN -ERROR@10191: expected SERVER_KW -ERROR@10195: expected SEMICOLON -ERROR@10196: expected command, found IDENT -ERROR@10206: expected command, found INCLUDING_KW -ERROR@10216: expected command, found ALL_KW -ERROR@10219: expected command, found R_PAREN -ERROR@10221: expected command, found SERVER_KW -ERROR@10228: expected command, found IDENT diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_create_view.snap b/crates/squawk_parser/tests/snapshots/tests__regression_create_view.snap index de48de09..71c68ff0 100644 --- a/crates/squawk_parser/tests/snapshots/tests__regression_create_view.snap +++ b/crates/squawk_parser/tests/snapshots/tests__regression_create_view.snap @@ -2,17 +2,6 @@ source: crates/squawk_parser/tests/tests.rs input_file: crates/squawk_parser/tests/data/regression_suite/create_view.sql --- -ERROR@3184: expected SEMICOLON -ERROR@18138: expected IDENT -ERROR@18138: expected SEMICOLON -ERROR@18139: expected command, found REF_KW -ERROR@18142: expected command, found COMMA -ERROR@18154: expected command, found IDENT -ERROR@19047: expected IDENT -ERROR@19047: expected SEMICOLON -ERROR@19048: expected command, found REF_KW -ERROR@19051: expected command, found COMMA -ERROR@19063: expected command, found IDENT ERROR@21388: expected SEMICOLON ERROR@21391: expected command, found COLLATION_KW ERROR@21401: expected command, found FOR_KW diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_domain.snap b/crates/squawk_parser/tests/snapshots/tests__regression_domain.snap index 268dabac..4487a82f 100644 --- a/crates/squawk_parser/tests/snapshots/tests__regression_domain.snap +++ b/crates/squawk_parser/tests/snapshots/tests__regression_domain.snap @@ -2,38 +2,13 @@ source: crates/squawk_parser/tests/tests.rs input_file: crates/squawk_parser/tests/data/regression_suite/domain.sql --- -ERROR@991: expected L_PAREN -ERROR@993: expected L_PAREN -ERROR@994: expected L_PAREN -ERROR@996: expected L_PAREN -ERROR@999: expected L_PAREN -ERROR@1006: expected L_PAREN -ERROR@1008: expected L_PAREN -ERROR@1015: expected L_PAREN -ERROR@1022: expected L_PAREN -ERROR@1029: expected L_PAREN -ERROR@1032: expected L_PAREN -ERROR@1037: expected L_PAREN -ERROR@1048: expected L_PAREN -ERROR@1051: expected L_PAREN -ERROR@1065: expected L_PAREN -ERROR@1067: expected L_PAREN -ERROR@1068: expected L_PAREN -ERROR@1070: expected L_PAREN -ERROR@1080: expected L_PAREN -ERROR@1239: expected L_PAREN -ERROR@1246: expected L_PAREN -ERROR@1253: expected L_PAREN -ERROR@1267: expected L_PAREN -ERROR@1277: expected R_PAREN -ERROR@1277: expected R_PAREN -ERROR@10391: expected EQ -ERROR@10391: expected SEMICOLON -ERROR@10391: expected command, found L_BRACK -ERROR@10392: expected command, found INT_NUMBER -ERROR@10393: expected command, found R_BRACK -ERROR@10395: expected command, found EQ -ERROR@10397: expected command, found ARRAY_KW -ERROR@10402: expected command, found L_BRACK -ERROR@10403: expected command, found INT_NUMBER -ERROR@10405: expected command, found R_BRACK +ERROR@10394: expected EQ +ERROR@10394: expected SEMICOLON +ERROR@10394: expected command, found L_BRACK +ERROR@10395: expected command, found INT_NUMBER +ERROR@10396: expected command, found R_BRACK +ERROR@10398: expected command, found EQ +ERROR@10400: expected command, found ARRAY_KW +ERROR@10405: expected command, found L_BRACK +ERROR@10406: expected command, found INT_NUMBER +ERROR@10408: expected command, found R_BRACK diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_foreign_data.snap b/crates/squawk_parser/tests/snapshots/tests__regression_foreign_data.snap index b4821fe4..dfeb198a 100644 --- a/crates/squawk_parser/tests/snapshots/tests__regression_foreign_data.snap +++ b/crates/squawk_parser/tests/snapshots/tests__regression_foreign_data.snap @@ -31,11 +31,8 @@ ERROR@16614: expected command, found L_PAREN ERROR@16615: expected command, found DROP_KW ERROR@16620: expected command, found DELIMITER_KW ERROR@16629: expected command, found COMMA -ERROR@16644: expected EQ -ERROR@16644: expected config value, got COMMA -ERROR@16644: expected SEMICOLON -ERROR@16644: expected command, found COMMA -ERROR@16646: expected command, found ADD_KW +ERROR@16640: expected EQ +ERROR@16649: expected SEMICOLON ERROR@16650: expected command, found ESCAPE_KW ERROR@16657: expected command, found STRING ERROR@16660: expected command, found R_PAREN @@ -51,11 +48,8 @@ ERROR@18566: expected command, found L_PAREN ERROR@18567: expected command, found DROP_KW ERROR@18572: expected command, found DELIMITER_KW ERROR@18581: expected command, found COMMA -ERROR@18596: expected EQ -ERROR@18596: expected config value, got COMMA -ERROR@18596: expected SEMICOLON -ERROR@18596: expected command, found COMMA -ERROR@18598: expected command, found ADD_KW +ERROR@18592: expected EQ +ERROR@18601: expected SEMICOLON ERROR@18602: expected command, found ESCAPE_KW ERROR@18609: expected command, found STRING ERROR@18612: expected command, found R_PAREN diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_guc.snap b/crates/squawk_parser/tests/snapshots/tests__regression_guc.snap deleted file mode 100644 index 1900a2ac..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_guc.snap +++ /dev/null @@ -1,85 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/guc.sql ---- -ERROR@4100: expected SEMICOLON -ERROR@4100: expected command, found DOT -ERROR@4101: expected command, found IDENT -ERROR@4144: expected EQ -ERROR@4144: expected config value, got DOT -ERROR@4144: expected SEMICOLON -ERROR@4144: expected command, found DOT -ERROR@4145: expected command, found IDENT -ERROR@4152: expected command, found EQ -ERROR@4154: expected command, found INT_NUMBER -ERROR@4169: expected SEMICOLON -ERROR@4169: expected command, found DOT -ERROR@4170: expected command, found IDENT -ERROR@4190: expected SEMICOLON -ERROR@4190: expected command, found DOT -ERROR@4191: expected command, found IDENT -ERROR@4266: expected SEMICOLON -ERROR@4266: expected command, found DOT -ERROR@4267: expected command, found IDENT -ERROR@4285: expected EQ -ERROR@4285: expected config value, got DOT -ERROR@4285: expected SEMICOLON -ERROR@4285: expected command, found DOT -ERROR@4286: expected command, found IDENT -ERROR@4288: expected command, found DOT -ERROR@4289: expected command, found IDENT -ERROR@4298: expected command, found DOT -ERROR@4299: expected command, found IDENT -ERROR@4303: expected command, found EQ -ERROR@4305: expected command, found STRING -ERROR@4323: expected SEMICOLON -ERROR@4323: expected command, found DOT -ERROR@4324: expected command, found IDENT -ERROR@4326: expected command, found DOT -ERROR@4327: expected command, found IDENT -ERROR@4336: expected command, found DOT -ERROR@4337: expected command, found IDENT -ERROR@4352: expected EQ -ERROR@4352: expected config value, got DOT -ERROR@4352: expected SEMICOLON -ERROR@4352: expected command, found DOT -ERROR@4353: expected command, found IDENT -ERROR@4363: expected command, found EQ -ERROR@4365: expected command, found INT_NUMBER -ERROR@4427: expected SEMICOLON -ERROR@4427: expected command, found DOT -ERROR@4428: expected command, found IDENT -ERROR@4450: expected EQ -ERROR@4450: expected config value, got DOT -ERROR@4450: expected SEMICOLON -ERROR@4450: expected command, found DOT -ERROR@4451: expected command, found IDENT -ERROR@4464: expected command, found EQ -ERROR@4466: expected command, found STRING -ERROR@4528: expected SEMICOLON -ERROR@4528: expected command, found DOT -ERROR@4529: expected command, found IDENT -ERROR@4653: expected EQ -ERROR@4653: expected config value, got DOT -ERROR@4653: expected SEMICOLON -ERROR@4653: expected command, found DOT -ERROR@4654: expected command, found IDENT -ERROR@4673: expected command, found EQ -ERROR@4675: expected command, found TRUE_KW -ERROR@4803: expected EQ -ERROR@4803: expected config value, got DOT -ERROR@4803: expected SEMICOLON -ERROR@4803: expected command, found DOT -ERROR@4804: expected command, found IDENT -ERROR@4823: expected command, found EQ -ERROR@4825: expected command, found TRUE_KW -ERROR@4866: expected SEMICOLON -ERROR@4866: expected command, found DOT -ERROR@4867: expected command, found IDENT -ERROR@7985: expected EQ -ERROR@7985: expected config value, got DOT -ERROR@7985: expected SEMICOLON -ERROR@7985: expected command, found DOT -ERROR@7986: expected command, found IDENT -ERROR@7994: expected command, found EQ -ERROR@7996: expected command, found STRING diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_insert.snap b/crates/squawk_parser/tests/snapshots/tests__regression_insert.snap deleted file mode 100644 index 7860d279..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_insert.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/insert.sql ---- -ERROR@1430: expected R_PAREN -ERROR@1444: expected SEMICOLON -ERROR@1444: expected command, found R_PAREN -ERROR@1510: expected R_PAREN -ERROR@1537: expected SEMICOLON -ERROR@1537: expected command, found R_PAREN -ERROR@1689: expected R_PAREN -ERROR@1703: expected SEMICOLON -ERROR@1703: expected command, found R_PAREN -ERROR@1850: expected R_PAREN -ERROR@1877: expected SEMICOLON -ERROR@1877: expected command, found R_PAREN -ERROR@26398: expected string literal -ERROR@26398: expected SEMICOLON -ERROR@26399: expected command, found STDOUT_KW -ERROR@26407: expected command, found INT_NUMBER -ERROR@26409: expected command, found IDENT -ERROR@26413: expected command, found INT_NUMBER -ERROR@26415: expected command, found IDENT diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_largeobject.snap b/crates/squawk_parser/tests/snapshots/tests__regression_largeobject.snap deleted file mode 100644 index 2c1420e1..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_largeobject.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/largeobject.sql ---- -ERROR@2820: expected SEMICOLON -ERROR@2821: expected command, found ON_KW -ERROR@2824: expected command, found LARGE_KW -ERROR@2830: expected command, found OBJECT_KW -ERROR@2837: expected command, found STRING -ERROR@2847: expected command, found IS_KW -ERROR@2850: expected command, found STRING -ERROR@7100: expected SEMICOLON -ERROR@7575: missing comma -ERROR@7593: expected SEMICOLON -ERROR@7594: expected command, found TO_KW -ERROR@7597: expected command, found IDENT diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_merge.snap b/crates/squawk_parser/tests/snapshots/tests__regression_merge.snap index 3040f6fa..bc307be6 100644 --- a/crates/squawk_parser/tests/snapshots/tests__regression_merge.snap +++ b/crates/squawk_parser/tests/snapshots/tests__regression_merge.snap @@ -63,126 +63,6 @@ ERROR@2347: expected SEMICOLON ERROR@2348: expected command, found IDENT ERROR@2356: expected command, found EQ ERROR@2358: expected command, found INT_NUMBER -ERROR@22860: expected IDENT -ERROR@22860: expected SEMICOLON -ERROR@22861: expected command, found ACTION_KW -ERROR@22867: expected command, found COMMA -ERROR@22879: expected command, found OLD_KW -ERROR@22882: expected command, found DOT -ERROR@22883: expected command, found IDENT -ERROR@22887: expected command, found AS_KW -ERROR@22890: expected command, found IDENT -ERROR@22897: expected command, found COMMA -ERROR@22899: expected command, found OLD_KW -ERROR@22902: expected command, found DOT -ERROR@22903: expected command, found IDENT -ERROR@22911: expected command, found AS_KW -ERROR@22914: expected command, found IDENT -ERROR@22925: expected command, found COMMA -ERROR@22937: expected command, found NEW_KW -ERROR@22940: expected command, found DOT -ERROR@22941: expected command, found IDENT -ERROR@22945: expected command, found AS_KW -ERROR@22948: expected command, found IDENT -ERROR@22955: expected command, found COMMA -ERROR@22957: expected command, found NEW_KW -ERROR@22960: expected command, found DOT -ERROR@22961: expected command, found IDENT -ERROR@22969: expected command, found AS_KW -ERROR@22972: expected command, found IDENT -ERROR@22983: expected command, found COMMA -ERROR@23046: expected SEMICOLON -ERROR@23046: expected command, found COMMA -ERROR@23048: expected command, found IDENT -ERROR@23049: expected command, found DOT -ERROR@23050: expected command, found STAR -ERROR@23051: expected command, found COMMA -ERROR@23063: expected command, found CASE_KW -ERROR@23068: expected command, found MERGE_ACTION_KW -ERROR@23080: expected command, found L_PAREN -ERROR@23081: expected command, found R_PAREN -ERROR@23097: expected command, found WHEN_KW -ERROR@23102: expected command, found STRING -ERROR@23111: expected command, found THEN_KW -ERROR@23116: expected command, found STRING -ERROR@23127: expected command, found PIPE -ERROR@23128: expected command, found PIPE -ERROR@23129: expected command, found IDENT -ERROR@23145: expected command, found WHEN_KW -ERROR@23150: expected command, found STRING -ERROR@23159: expected command, found THEN_KW -ERROR@23164: expected command, found STRING -ERROR@23172: expected command, found PIPE -ERROR@23173: expected command, found PIPE -ERROR@23174: expected command, found IDENT -ERROR@23179: expected command, found PIPE -ERROR@23180: expected command, found PIPE -ERROR@23181: expected command, found STRING -ERROR@23209: expected command, found WHEN_KW -ERROR@23214: expected command, found STRING -ERROR@23223: expected command, found THEN_KW -ERROR@23228: expected command, found STRING -ERROR@23238: expected command, found PIPE -ERROR@23239: expected command, found PIPE -ERROR@23240: expected command, found IDENT -ERROR@23255: expected SEMICOLON -ERROR@23256: expected command, found AS_KW -ERROR@23259: expected command, found IDENT -ERROR@23931: expected IDENT -ERROR@23931: expected R_PAREN -ERROR@23931: expected DELETE, SELECT, TABLE, UPDATE, or MERGE, got: ACTION_KW -ERROR@23932: expected command, found ACTION_KW -ERROR@23938: expected command, found COMMA -ERROR@23940: expected command, found OLD_KW -ERROR@23944: expected command, found AS_KW -ERROR@23947: expected command, found IDENT -ERROR@23955: expected command, found COMMA -ERROR@23957: expected command, found NEW_KW -ERROR@23961: expected command, found AS_KW -ERROR@23964: expected command, found IDENT -ERROR@23972: expected command, found COMMA -ERROR@23974: expected command, found IDENT -ERROR@23975: expected command, found DOT -ERROR@23976: expected command, found STAR -ERROR@23977: expected command, found COMMA -ERROR@23993: expected command, found CASE_KW -ERROR@23998: expected command, found MERGE_ACTION_KW -ERROR@24010: expected command, found L_PAREN -ERROR@24011: expected command, found R_PAREN -ERROR@24031: expected command, found WHEN_KW -ERROR@24036: expected command, found STRING -ERROR@24045: expected command, found THEN_KW -ERROR@24050: expected command, found STRING -ERROR@24061: expected command, found PIPE -ERROR@24062: expected command, found PIPE -ERROR@24063: expected command, found IDENT -ERROR@24083: expected command, found WHEN_KW -ERROR@24088: expected command, found STRING -ERROR@24097: expected command, found THEN_KW -ERROR@24102: expected command, found STRING -ERROR@24110: expected command, found PIPE -ERROR@24111: expected command, found PIPE -ERROR@24112: expected command, found IDENT -ERROR@24117: expected command, found PIPE -ERROR@24118: expected command, found PIPE -ERROR@24119: expected command, found STRING -ERROR@24151: expected command, found WHEN_KW -ERROR@24156: expected command, found STRING -ERROR@24165: expected command, found THEN_KW -ERROR@24170: expected command, found STRING -ERROR@24180: expected command, found PIPE -ERROR@24181: expected command, found PIPE -ERROR@24182: expected command, found IDENT -ERROR@24201: expected SEMICOLON -ERROR@24202: expected command, found AS_KW -ERROR@24205: expected command, found IDENT -ERROR@24217: expected command, found R_PAREN -ERROR@24218: expected command, found COMMA -ERROR@24220: expected command, found IDENT -ERROR@24223: expected command, found AS_KW -ERROR@24226: expected command, found L_PAREN -ERROR@24518: expected SEMICOLON -ERROR@24519: expected command, found R_PAREN ERROR@41486: expected ON_KW ERROR@41493: expected WHEN_KW ERROR@41493: expected MATCHED, or NOT MATCHED diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_misc.snap b/crates/squawk_parser/tests/snapshots/tests__regression_misc.snap deleted file mode 100644 index 911bb15d..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_misc.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/misc.sql ---- -ERROR@1452: expected SEMICOLON -ERROR@1453: expected command, found IDENT -ERROR@1462: expected command, found TO_KW -ERROR@1465: expected command, found STRING -ERROR@1539: expected SEMICOLON -ERROR@1540: expected command, found IDENT -ERROR@1554: expected command, found FROM_KW -ERROR@1559: expected command, found STRING diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_misc_functions.snap b/crates/squawk_parser/tests/snapshots/tests__regression_misc_functions.snap deleted file mode 100644 index 1d6ac8ee..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_misc_functions.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/misc_functions.sql ---- -ERROR@4864: expected SEMICOLON -ERROR@12867: expected SEMICOLON -ERROR@13805: expected R_PAREN -ERROR@13805: expected SEMICOLON -ERROR@13806: expected command, found EXTERNAL_KW -ERROR@13814: expected command, found R_PAREN -ERROR@14006: expected SEMICOLON -ERROR@14115: expected field name or number, got STRING -ERROR@14125: expected a name, got CAST_EXPR diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_namespace.snap b/crates/squawk_parser/tests/snapshots/tests__regression_namespace.snap deleted file mode 100644 index 78aaca46..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_namespace.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/namespace.sql ---- -ERROR@253: expected SEMICOLON -ERROR@301: expected SEMICOLON -ERROR@382: expected SEMICOLON -ERROR@1810: expected SEMICOLON diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_numerology.snap b/crates/squawk_parser/tests/snapshots/tests__regression_numerology.snap deleted file mode 100644 index a8071b86..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_numerology.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/numerology.sql ---- -ERROR@1750: missing comma -ERROR@1203: Missing digits after the exponent symbol -ERROR@1216: Missing digits after the exponent symbol -ERROR@1292: Missing digits after the integer base prefix -ERROR@1328: Missing digits after the integer base prefix -ERROR@1364: Missing digits after the integer base prefix diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_partition_prune.snap b/crates/squawk_parser/tests/snapshots/tests__regression_partition_prune.snap index e71a29f9..36d6f935 100644 --- a/crates/squawk_parser/tests/snapshots/tests__regression_partition_prune.snap +++ b/crates/squawk_parser/tests/snapshots/tests__regression_partition_prune.snap @@ -168,7 +168,6 @@ ERROR@61855: expected command, found MATCHED_KW ERROR@61863: expected command, found THEN_KW ERROR@61874: expected INTO_KW ERROR@61883: expected R_PAREN -ERROR@61883: expected select stmt ERROR@61883: expected SEMICOLON ERROR@61883: expected command, found INT_NUMBER ERROR@61884: expected command, found COMMA @@ -214,7 +213,6 @@ ERROR@62061: expected command, found MATCHED_KW ERROR@62069: expected command, found THEN_KW ERROR@62080: expected INTO_KW ERROR@62089: expected R_PAREN -ERROR@62089: expected select stmt ERROR@62089: expected SEMICOLON ERROR@62089: expected command, found INT_NUMBER ERROR@62090: expected command, found COMMA @@ -263,7 +261,6 @@ ERROR@62451: expected command, found MATCHED_KW ERROR@62459: expected command, found THEN_KW ERROR@62470: expected INTO_KW ERROR@62479: expected R_PAREN -ERROR@62479: expected select stmt ERROR@62479: expected SEMICOLON ERROR@62479: expected command, found INT_NUMBER ERROR@62480: expected command, found COMMA @@ -315,7 +312,6 @@ ERROR@62746: expected command, found MATCHED_KW ERROR@62754: expected command, found THEN_KW ERROR@62765: expected INTO_KW ERROR@62774: expected R_PAREN -ERROR@62774: expected select stmt ERROR@62774: expected SEMICOLON ERROR@62774: expected command, found INT_NUMBER ERROR@62775: expected command, found COMMA diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_plpgsql.snap b/crates/squawk_parser/tests/snapshots/tests__regression_plpgsql.snap deleted file mode 100644 index bf38e5e6..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_plpgsql.snap +++ /dev/null @@ -1,132 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/plpgsql.sql ---- -ERROR@55613: expected command, found INT_NUMBER -ERROR@55615: expected command, found INT_NUMBER -ERROR@55618: expected command, found INT_NUMBER -ERROR@55621: expected command, found INT_NUMBER -ERROR@55625: expected command, found INT_NUMBER -ERROR@55629: expected command, found INT_NUMBER -ERROR@69836: expected EQ -ERROR@69836: expected config value, got DOT -ERROR@69836: expected SEMICOLON -ERROR@69836: expected command, found DOT -ERROR@69837: expected command, found IDENT -ERROR@69857: expected command, found TO_KW -ERROR@69860: expected command, found TRUE_KW -ERROR@72267: expected SEMICOLON -ERROR@72267: expected command, found DOT -ERROR@72268: expected command, found IDENT -ERROR@72672: expected EQ -ERROR@72672: expected config value, got DOT -ERROR@72672: expected SEMICOLON -ERROR@72672: expected command, found DOT -ERROR@72673: expected command, found IDENT -ERROR@72688: expected command, found TO_KW -ERROR@72691: expected command, found STRING -ERROR@72709: expected EQ -ERROR@72709: expected config value, got DOT -ERROR@72709: expected SEMICOLON -ERROR@72709: expected command, found DOT -ERROR@72710: expected command, found IDENT -ERROR@72725: expected command, found TO_KW -ERROR@72728: expected command, found STRING -ERROR@72747: expected EQ -ERROR@72747: expected config value, got DOT -ERROR@72747: expected SEMICOLON -ERROR@72747: expected command, found DOT -ERROR@72748: expected command, found IDENT -ERROR@72761: expected command, found TO_KW -ERROR@72764: expected command, found STRING -ERROR@72782: expected EQ -ERROR@72782: expected config value, got DOT -ERROR@72782: expected SEMICOLON -ERROR@72782: expected command, found DOT -ERROR@72783: expected command, found IDENT -ERROR@72796: expected command, found TO_KW -ERROR@72799: expected command, found STRING -ERROR@72863: expected EQ -ERROR@72863: expected config value, got DOT -ERROR@72863: expected SEMICOLON -ERROR@72863: expected command, found DOT -ERROR@72864: expected command, found IDENT -ERROR@72879: expected command, found TO_KW -ERROR@72882: expected command, found STRING -ERROR@73127: expected EQ -ERROR@73127: expected config value, got DOT -ERROR@73127: expected SEMICOLON -ERROR@73127: expected command, found DOT -ERROR@73128: expected command, found IDENT -ERROR@73143: expected command, found TO_KW -ERROR@73146: expected command, found STRING -ERROR@74051: expected EQ -ERROR@74051: expected config value, got DOT -ERROR@74051: expected SEMICOLON -ERROR@74051: expected command, found DOT -ERROR@74052: expected command, found IDENT -ERROR@74065: expected command, found TO_KW -ERROR@74068: expected command, found STRING -ERROR@74254: expected SEMICOLON -ERROR@74254: expected command, found DOT -ERROR@74255: expected command, found IDENT -ERROR@74282: expected SEMICOLON -ERROR@74282: expected command, found DOT -ERROR@74283: expected command, found IDENT -ERROR@74485: expected EQ -ERROR@74485: expected config value, got DOT -ERROR@74485: expected SEMICOLON -ERROR@74485: expected command, found DOT -ERROR@74486: expected command, found IDENT -ERROR@74501: expected command, found TO_KW -ERROR@74504: expected command, found STRING -ERROR@74620: expected EQ -ERROR@74620: expected config value, got DOT -ERROR@74620: expected SEMICOLON -ERROR@74620: expected command, found DOT -ERROR@74621: expected command, found IDENT -ERROR@74634: expected command, found TO_KW -ERROR@74637: expected command, found STRING -ERROR@74755: expected SEMICOLON -ERROR@74755: expected command, found DOT -ERROR@74756: expected command, found IDENT -ERROR@74783: expected SEMICOLON -ERROR@74783: expected command, found DOT -ERROR@74784: expected command, found IDENT -ERROR@74812: expected EQ -ERROR@74812: expected config value, got DOT -ERROR@74812: expected SEMICOLON -ERROR@74812: expected command, found DOT -ERROR@74813: expected command, found IDENT -ERROR@74828: expected command, found TO_KW -ERROR@74831: expected command, found STRING -ERROR@74989: expected EQ -ERROR@74989: expected config value, got DOT -ERROR@74989: expected SEMICOLON -ERROR@74989: expected command, found DOT -ERROR@74990: expected command, found IDENT -ERROR@75003: expected command, found TO_KW -ERROR@75006: expected command, found STRING -ERROR@75757: expected SEMICOLON -ERROR@75757: expected command, found DOT -ERROR@75758: expected command, found IDENT -ERROR@75785: expected SEMICOLON -ERROR@75785: expected command, found DOT -ERROR@75786: expected command, found IDENT -ERROR@102320: expected EQ -ERROR@102320: expected config value, got DOT -ERROR@102320: expected SEMICOLON -ERROR@102320: expected command, found DOT -ERROR@102321: expected command, found IDENT -ERROR@102339: expected command, found EQ -ERROR@102341: expected command, found ERROR_KW -ERROR@111464: expected EQ -ERROR@111464: expected config value, got DOT -ERROR@111464: expected SEMICOLON -ERROR@111464: expected command, found DOT -ERROR@111465: expected command, found IDENT -ERROR@111479: expected command, found EQ -ERROR@111481: expected command, found OFF_KW -ERROR@111554: expected SEMICOLON -ERROR@111554: expected command, found DOT -ERROR@111555: expected command, found IDENT diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_rangefuncs.snap b/crates/squawk_parser/tests/snapshots/tests__regression_rangefuncs.snap index 41099661..38f953b3 100644 --- a/crates/squawk_parser/tests/snapshots/tests__regression_rangefuncs.snap +++ b/crates/squawk_parser/tests/snapshots/tests__regression_rangefuncs.snap @@ -283,13 +283,3 @@ ERROR@28936: expected L_PAREN ERROR@28936: expected command, found SEMICOLON ERROR@28937: expected SELECT, TABLE, VALUES, INSERT, UPDATE, DELETE, or MERGE statement ERROR@28937: expected R_PAREN -ERROR@29704: expected IDENT -ERROR@29704: expected SEMICOLON -ERROR@29705: expected command, found REF_KW -ERROR@29708: expected command, found COMMA -ERROR@29720: expected command, found IDENT -ERROR@30331: expected IDENT -ERROR@30331: expected SEMICOLON -ERROR@30332: expected command, found REF_KW -ERROR@30335: expected command, found COMMA -ERROR@30347: expected command, found IDENT diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_rowsecurity.snap b/crates/squawk_parser/tests/snapshots/tests__regression_rowsecurity.snap deleted file mode 100644 index c750a6cc..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_rowsecurity.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/rowsecurity.sql ---- -ERROR@19198: expected R_PAREN -ERROR@19263: expected SEMICOLON -ERROR@19263: expected command, found R_PAREN -ERROR@19316: expected R_PAREN -ERROR@19379: expected SEMICOLON -ERROR@19379: expected command, found R_PAREN -ERROR@24068: expected R_PAREN -ERROR@24133: expected SEMICOLON -ERROR@24133: expected command, found R_PAREN -ERROR@48431: expected R_PAREN -ERROR@48494: expected SEMICOLON -ERROR@48494: expected command, found R_PAREN -ERROR@50391: expected R_PAREN -ERROR@50454: expected SEMICOLON -ERROR@50454: expected command, found R_PAREN -ERROR@51523: expected R_PAREN -ERROR@51539: expected SEMICOLON -ERROR@51539: expected command, found R_PAREN -ERROR@51578: expected R_PAREN -ERROR@51594: expected SEMICOLON -ERROR@51594: expected command, found R_PAREN -ERROR@54086: expected R_PAREN -ERROR@54149: expected SEMICOLON -ERROR@54149: expected command, found R_PAREN -ERROR@79066: expected SEMICOLON -ERROR@79066: expected command, found DOT -ERROR@79067: expected command, found IDENT diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_select_parallel.snap b/crates/squawk_parser/tests/snapshots/tests__regression_select_parallel.snap deleted file mode 100644 index 089d7e23..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_select_parallel.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/select_parallel.sql ---- -ERROR@18384: expected R_PAREN -ERROR@18424: expected SEMICOLON -ERROR@18424: expected command, found R_PAREN diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_stats.snap b/crates/squawk_parser/tests/snapshots/tests__regression_stats.snap deleted file mode 100644 index aa40bb28..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_stats.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/stats.sql ---- -ERROR@25578: expected command, found IDENT -ERROR@25905: expected command, found IDENT -ERROR@29136: expected command, found IDENT -ERROR@30032: expected command, found IDENT -ERROR@31781: expected command, found IDENT -ERROR@32443: expected command, found IDENT diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_stats_ext.snap b/crates/squawk_parser/tests/snapshots/tests__regression_stats_ext.snap deleted file mode 100644 index 5c41f0d1..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_stats_ext.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/stats_ext.sql ---- -ERROR@876: expected FROM_KW -ERROR@876: expected path name -ERROR@907: expected FROM_KW -ERROR@907: expected path name -ERROR@4859: expected OWNER, RENAME, or SET -ERROR@4859: expected SEMICOLON -ERROR@4860: expected command, found EXISTS_KW -ERROR@4867: expected command, found IDENT -ERROR@4895: expected EQ diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_suite_errors.snap b/crates/squawk_parser/tests/snapshots/tests__regression_suite_errors.snap index 0967e359..c0663c51 100644 --- a/crates/squawk_parser/tests/snapshots/tests__regression_suite_errors.snap +++ b/crates/squawk_parser/tests/snapshots/tests__regression_suite_errors.snap @@ -2,46 +2,28 @@ source: crates/squawk_parser/tests/tests.rs expression: "out.join(\"\\n\")" --- -tests/snapshots/tests__regression_copyselect.snap:21 -tests/snapshots/tests__regression_create_index.snap:10 -tests/snapshots/tests__regression_create_operator.snap:17 -tests/snapshots/tests__regression_create_table.snap:31 -tests/snapshots/tests__regression_create_table_like.snap:20 -tests/snapshots/tests__regression_create_view.snap:265 -tests/snapshots/tests__regression_domain.snap:35 +tests/snapshots/tests__regression_create_view.snap:254 +tests/snapshots/tests__regression_domain.snap:10 tests/snapshots/tests__regression_errors.snap:286 -tests/snapshots/tests__regression_foreign_data.snap:57 +tests/snapshots/tests__regression_foreign_data.snap:51 tests/snapshots/tests__regression_foreign_key.snap:24 tests/snapshots/tests__regression_groupingsets.snap:97 -tests/snapshots/tests__regression_guc.snap:81 tests/snapshots/tests__regression_horology.snap:173 tests/snapshots/tests__regression_inherit.snap:30 -tests/snapshots/tests__regression_insert.snap:19 tests/snapshots/tests__regression_insert_conflict.snap:253 tests/snapshots/tests__regression_join.snap:20 -tests/snapshots/tests__regression_largeobject.snap:12 -tests/snapshots/tests__regression_merge.snap:370 -tests/snapshots/tests__regression_misc.snap:8 -tests/snapshots/tests__regression_misc_functions.snap:9 -tests/snapshots/tests__regression_namespace.snap:4 -tests/snapshots/tests__regression_numerology.snap:6 -tests/snapshots/tests__regression_partition_prune.snap:330 -tests/snapshots/tests__regression_plpgsql.snap:128 +tests/snapshots/tests__regression_merge.snap:250 +tests/snapshots/tests__regression_partition_prune.snap:326 tests/snapshots/tests__regression_privileges.snap:84 tests/snapshots/tests__regression_publication.snap:71 -tests/snapshots/tests__regression_rangefuncs.snap:291 +tests/snapshots/tests__regression_rangefuncs.snap:281 tests/snapshots/tests__regression_returning.snap:230 -tests/snapshots/tests__regression_rowsecurity.snap:27 tests/snapshots/tests__regression_rules.snap:59 -tests/snapshots/tests__regression_select_parallel.snap:3 tests/snapshots/tests__regression_sqljson.snap:1073 tests/snapshots/tests__regression_sqljson_jsontable.snap:185 tests/snapshots/tests__regression_sqljson_queryfuncs.snap:51 -tests/snapshots/tests__regression_stats.snap:6 -tests/snapshots/tests__regression_stats_ext.snap:9 tests/snapshots/tests__regression_strings.snap:188 tests/snapshots/tests__regression_subselect.snap:52 -tests/snapshots/tests__regression_tablesample.snap:6 tests/snapshots/tests__regression_timestamp.snap:65 tests/snapshots/tests__regression_timestamptz.snap:13 tests/snapshots/tests__regression_transactions.snap:114 diff --git a/crates/squawk_parser/tests/snapshots/tests__regression_tablesample.snap b/crates/squawk_parser/tests/snapshots/tests__regression_tablesample.snap deleted file mode 100644 index 2c050ff7..00000000 --- a/crates/squawk_parser/tests/snapshots/tests__regression_tablesample.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: crates/squawk_parser/tests/tests.rs -input_file: crates/squawk_parser/tests/data/regression_suite/tablesample.sql ---- -ERROR@3796: expected SEMICOLON -ERROR@3797: expected command, found TABLESAMPLE_KW -ERROR@3809: expected command, found IDENT -ERROR@3819: expected command, found L_PAREN -ERROR@3820: expected command, found INT_NUMBER -ERROR@3821: expected command, found R_PAREN diff --git a/crates/squawk_parser/tests/snapshots/tests__reset_ok.snap b/crates/squawk_parser/tests/snapshots/tests__reset_ok.snap index 66a3cf6c..54fcb5dd 100644 --- a/crates/squawk_parser/tests/snapshots/tests__reset_ok.snap +++ b/crates/squawk_parser/tests/snapshots/tests__reset_ok.snap @@ -8,8 +8,10 @@ SOURCE_FILE RESET RESET_KW "reset" WHITESPACE " " - NAME_REF - IDENT "some_config_param" + PATH + PATH_SEGMENT + NAME_REF + IDENT "some_config_param" SEMICOLON ";" WHITESPACE "\n" RESET diff --git a/crates/squawk_parser/tests/snapshots/tests__schemas_ok.snap b/crates/squawk_parser/tests/snapshots/tests__schemas_ok.snap index ba7f8ac9..35c71f59 100644 --- a/crates/squawk_parser/tests/snapshots/tests__schemas_ok.snap +++ b/crates/squawk_parser/tests/snapshots/tests__schemas_ok.snap @@ -368,15 +368,19 @@ SOURCE_FILE SHOW SHOW_KW "show" WHITESPACE " " - NAME_REF - IDENT "search_path" + PATH + PATH_SEGMENT + NAME_REF + IDENT "search_path" SEMICOLON ";" WHITESPACE "\n\n" SET SET_KW "set" WHITESPACE " " - NAME_REF - IDENT "search_path" + PATH + PATH_SEGMENT + NAME_REF + IDENT "search_path" WHITESPACE " " TO_KW "to" WHITESPACE " " @@ -388,8 +392,10 @@ SOURCE_FILE SET SET_KW "set" WHITESPACE " " - NAME_REF - IDENT "search_path" + PATH + PATH_SEGMENT + NAME_REF + IDENT "search_path" WHITESPACE " " TO_KW "to" WHITESPACE " " @@ -399,8 +405,10 @@ SOURCE_FILE SET SET_KW "set" WHITESPACE " " - NAME_REF - IDENT "foo" + PATH + PATH_SEGMENT + NAME_REF + IDENT "foo" WHITESPACE " " EQ "=" WHITESPACE " " @@ -441,8 +449,10 @@ SOURCE_FILE SET SET_KW "set" WHITESPACE " " - NAME_REF - IDENT "foo" + PATH + PATH_SEGMENT + NAME_REF + IDENT "foo" WHITESPACE " " EQ "=" WHITESPACE " " @@ -452,8 +462,10 @@ SOURCE_FILE SET SET_KW "set" WHITESPACE " " - NAME_REF - IDENT "foo" + PATH + PATH_SEGMENT + NAME_REF + IDENT "foo" WHITESPACE " " TO_KW "to" WHITESPACE " " diff --git a/crates/squawk_parser/tests/snapshots/tests__update_ok.snap b/crates/squawk_parser/tests/snapshots/tests__update_ok.snap index b99ce0e1..b76f359f 100644 --- a/crates/squawk_parser/tests/snapshots/tests__update_ok.snap +++ b/crates/squawk_parser/tests/snapshots/tests__update_ok.snap @@ -354,9 +354,11 @@ SOURCE_FILE LITERAL INT_NUMBER "2" WHITESPACE " " - AS_KW "as" - WHITESPACE " " - IDENT "bar" + ALIAS + AS_KW "as" + WHITESPACE " " + NAME + IDENT "bar" SEMICOLON ";" WHITESPACE "\n\n" COMMENT "-- pg_docs"