Skip to content

feat: use postgres regress tests #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 212 additions & 0 deletions crates/parser/tests/skipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
advisory_lock
aggregates
alter_generic
alter_operator
alter_table
amutils
arrays
async
bit
bitmapops
boolean
box
brin
brin_bloom
brin_multi
btree_index
case
char
circle
cluster
collate.icu.utf8
collate.linux.utf8
collate
combocid
comments
compression
constraints
conversion
copy
copy2
copydml
copyselect
create_aggregate
create_am
create_cast
create_function_c
create_function_sql
create_index
create_index_spgist
create_misc
create_operator
create_procedure
create_role
create_table
create_table_like
create_type
create_view
date
dbsize
delete
dependency
domain
drop_if_exists
drop_operator
enum
equivclass
errors
event_trigger
explain
expressions
fast_default
float4
float8
foreign_data
foreign_key
functional_deps
generated
geometry
gin
gist
groupingsets
guc
hash_func
hash_index
hash_part
horology
identity
incremental_sort
index_including
index_including_gist
indexing
indirect_toast
inet
infinite_recurse
inherit
init_privs
insert
insert_conflict
int2
int4
int8
interval
join
join_hash
json
json_encoding
jsonb
jsonb_jsonpath
jsonpath
jsonpath_encoding
largeobject
limit
line
lock
macaddr
macaddr8
matview
memoize
merge
misc
misc_functions
misc_sanity
money
multirangetypes
mvcc
name
namespace
numeric
numeric_big
numerology
object_address
oid
oidjoins
opr_sanity
partition_aggregate
partition_info
partition_join
partition_prune
password
path
pg_lsn
plancache
plpgsql
point
polygon
polymorphism
portals
portals_p2
prepare
prepared_xacts
privileges
psql
psql_crosstab
publication
random
rangefuncs
rangetypes
regex
regproc
reindex_catalog
reloptions
replica_identity
returning
roleattributes
rowsecurity
rowtypes
rules
sanity_check
security_label
select
select_distinct
select_distinct_on
select_having
select_implicit
select_into
select_parallel
select_views
sequence
spgist
stats
stats_ext
strings
subscription
subselect
sysviews
tablesample
tablespace
temp
test_setup
text
tid
tidrangescan
tidscan
time
timestamp
timestamptz
timetz
transactions
triggers
truncate
tsdicts
tsearch
tsrf
tstypes
tuplesort
txid
type_sanity
typed_table
unicode
union
updatable_views
update
uuid
vacuum
vacuum_parallel
varchar
window
with
write_parallel
xid
xml
xmlmap
114 changes: 114 additions & 0 deletions crates/parser/tests/snapshots/statements/valid/lseg@1.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
source: crates/parser/tests/statement_parser_test.rs
description: "--\n-- LSEG\n-- Line segments\n--\n\n--DROP TABLE LSEG_TBL;\nCREATE TABLE LSEG_TBL (s lseg);"
---
Parse {
cst: SourceFile@0..86
SqlComment@0..2 "--"
Newline@2..3 "\n"
SqlComment@3..10 "-- LSEG"
Newline@10..11 "\n"
SqlComment@11..27 "-- Line segments"
Newline@27..28 "\n"
SqlComment@28..30 "--"
Newline@30..32 "\n\n"
SqlComment@32..54 "--DROP TABLE LSEG_TBL;"
Newline@54..55 "\n"
CreateStmt@55..86
Create@55..61 "CREATE"
Whitespace@61..62 " "
Table@62..67 "TABLE"
Whitespace@67..68 " "
RangeVar@68..76
Ident@68..76 "LSEG_TBL"
Whitespace@76..77 " "
Ascii40@77..78 "("
ColumnDef@78..84
Ident@78..79 "s"
Whitespace@79..80 " "
TypeName@80..84
Ident@80..84 "lseg"
Ascii41@84..85 ")"
Ascii59@85..86 ";"
,
errors: [],
stmts: [
RawStmt {
stmt: CreateStmt(
CreateStmt {
relation: Some(
RangeVar {
catalogname: "",
schemaname: "",
relname: "lseg_tbl",
inh: true,
relpersistence: "p",
alias: None,
location: 13,
},
),
table_elts: [
Node {
node: Some(
ColumnDef(
ColumnDef {
colname: "s",
type_name: Some(
TypeName {
names: [
Node {
node: Some(
String(
String {
sval: "lseg",
},
),
),
},
],
type_oid: 0,
setof: false,
pct_type: false,
typmods: [],
typemod: -1,
array_bounds: [],
location: 25,
},
),
compression: "",
inhcount: 0,
is_local: true,
is_not_null: false,
is_from_type: false,
storage: "",
raw_default: None,
cooked_default: None,
identity: "",
identity_sequence: None,
generated: "",
coll_clause: None,
coll_oid: 0,
constraints: [],
fdwoptions: [],
location: 23,
},
),
),
},
],
inh_relations: [],
partbound: None,
partspec: None,
of_typename: None,
constraints: [],
options: [],
oncommit: OncommitNoop,
tablespacename: "",
access_method: "",
if_not_exists: false,
},
),
range: 54..85,
},
],
}
Loading