Skip to content

Commit e97a55d

Browse files
authored
Merge pull request #111 from cvng/feat/pg-reg-tests
feat: use postgres regress tests
2 parents 29a47de + 541c52b commit e97a55d

File tree

16 files changed

+1946
-32
lines changed

16 files changed

+1946
-32
lines changed

crates/parser/tests/skipped.txt

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
advisory_lock
2+
aggregates
3+
alter_generic
4+
alter_operator
5+
alter_table
6+
amutils
7+
arrays
8+
async
9+
bit
10+
bitmapops
11+
boolean
12+
box
13+
brin
14+
brin_bloom
15+
brin_multi
16+
btree_index
17+
case
18+
char
19+
circle
20+
cluster
21+
collate.icu.utf8
22+
collate.linux.utf8
23+
collate
24+
combocid
25+
comments
26+
compression
27+
constraints
28+
conversion
29+
copy
30+
copy2
31+
copydml
32+
copyselect
33+
create_aggregate
34+
create_am
35+
create_cast
36+
create_function_c
37+
create_function_sql
38+
create_index
39+
create_index_spgist
40+
create_misc
41+
create_operator
42+
create_procedure
43+
create_role
44+
create_table
45+
create_table_like
46+
create_type
47+
create_view
48+
date
49+
dbsize
50+
delete
51+
dependency
52+
domain
53+
drop_if_exists
54+
drop_operator
55+
enum
56+
equivclass
57+
errors
58+
event_trigger
59+
explain
60+
expressions
61+
fast_default
62+
float4
63+
float8
64+
foreign_data
65+
foreign_key
66+
functional_deps
67+
generated
68+
geometry
69+
gin
70+
gist
71+
groupingsets
72+
guc
73+
hash_func
74+
hash_index
75+
hash_part
76+
horology
77+
identity
78+
incremental_sort
79+
index_including
80+
index_including_gist
81+
indexing
82+
indirect_toast
83+
inet
84+
infinite_recurse
85+
inherit
86+
init_privs
87+
insert
88+
insert_conflict
89+
int2
90+
int4
91+
int8
92+
interval
93+
join
94+
join_hash
95+
json
96+
json_encoding
97+
jsonb
98+
jsonb_jsonpath
99+
jsonpath
100+
jsonpath_encoding
101+
largeobject
102+
limit
103+
line
104+
lock
105+
macaddr
106+
macaddr8
107+
matview
108+
memoize
109+
merge
110+
misc
111+
misc_functions
112+
misc_sanity
113+
money
114+
multirangetypes
115+
mvcc
116+
name
117+
namespace
118+
numeric
119+
numeric_big
120+
numerology
121+
object_address
122+
oid
123+
oidjoins
124+
opr_sanity
125+
partition_aggregate
126+
partition_info
127+
partition_join
128+
partition_prune
129+
password
130+
path
131+
pg_lsn
132+
plancache
133+
plpgsql
134+
point
135+
polygon
136+
polymorphism
137+
portals
138+
portals_p2
139+
prepare
140+
prepared_xacts
141+
privileges
142+
psql
143+
psql_crosstab
144+
publication
145+
random
146+
rangefuncs
147+
rangetypes
148+
regex
149+
regproc
150+
reindex_catalog
151+
reloptions
152+
replica_identity
153+
returning
154+
roleattributes
155+
rowsecurity
156+
rowtypes
157+
rules
158+
sanity_check
159+
security_label
160+
select
161+
select_distinct
162+
select_distinct_on
163+
select_having
164+
select_implicit
165+
select_into
166+
select_parallel
167+
select_views
168+
sequence
169+
spgist
170+
stats
171+
stats_ext
172+
strings
173+
subscription
174+
subselect
175+
sysviews
176+
tablesample
177+
tablespace
178+
temp
179+
test_setup
180+
text
181+
tid
182+
tidrangescan
183+
tidscan
184+
time
185+
timestamp
186+
timestamptz
187+
timetz
188+
transactions
189+
triggers
190+
truncate
191+
tsdicts
192+
tsearch
193+
tsrf
194+
tstypes
195+
tuplesort
196+
txid
197+
type_sanity
198+
typed_table
199+
unicode
200+
union
201+
updatable_views
202+
update
203+
uuid
204+
vacuum
205+
vacuum_parallel
206+
varchar
207+
window
208+
with
209+
write_parallel
210+
xid
211+
xml
212+
xmlmap
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
source: crates/parser/tests/statement_parser_test.rs
3+
description: "--\n-- LSEG\n-- Line segments\n--\n\n--DROP TABLE LSEG_TBL;\nCREATE TABLE LSEG_TBL (s lseg);"
4+
---
5+
Parse {
6+
cst: SourceFile@0..86
7+
SqlComment@0..2 "--"
8+
Newline@2..3 "\n"
9+
SqlComment@3..10 "-- LSEG"
10+
Newline@10..11 "\n"
11+
SqlComment@11..27 "-- Line segments"
12+
Newline@27..28 "\n"
13+
SqlComment@28..30 "--"
14+
Newline@30..32 "\n\n"
15+
SqlComment@32..54 "--DROP TABLE LSEG_TBL;"
16+
Newline@54..55 "\n"
17+
CreateStmt@55..86
18+
Create@55..61 "CREATE"
19+
Whitespace@61..62 " "
20+
Table@62..67 "TABLE"
21+
Whitespace@67..68 " "
22+
RangeVar@68..76
23+
Ident@68..76 "LSEG_TBL"
24+
Whitespace@76..77 " "
25+
Ascii40@77..78 "("
26+
ColumnDef@78..84
27+
Ident@78..79 "s"
28+
Whitespace@79..80 " "
29+
TypeName@80..84
30+
Ident@80..84 "lseg"
31+
Ascii41@84..85 ")"
32+
Ascii59@85..86 ";"
33+
,
34+
errors: [],
35+
stmts: [
36+
RawStmt {
37+
stmt: CreateStmt(
38+
CreateStmt {
39+
relation: Some(
40+
RangeVar {
41+
catalogname: "",
42+
schemaname: "",
43+
relname: "lseg_tbl",
44+
inh: true,
45+
relpersistence: "p",
46+
alias: None,
47+
location: 13,
48+
},
49+
),
50+
table_elts: [
51+
Node {
52+
node: Some(
53+
ColumnDef(
54+
ColumnDef {
55+
colname: "s",
56+
type_name: Some(
57+
TypeName {
58+
names: [
59+
Node {
60+
node: Some(
61+
String(
62+
String {
63+
sval: "lseg",
64+
},
65+
),
66+
),
67+
},
68+
],
69+
type_oid: 0,
70+
setof: false,
71+
pct_type: false,
72+
typmods: [],
73+
typemod: -1,
74+
array_bounds: [],
75+
location: 25,
76+
},
77+
),
78+
compression: "",
79+
inhcount: 0,
80+
is_local: true,
81+
is_not_null: false,
82+
is_from_type: false,
83+
storage: "",
84+
raw_default: None,
85+
cooked_default: None,
86+
identity: "",
87+
identity_sequence: None,
88+
generated: "",
89+
coll_clause: None,
90+
coll_oid: 0,
91+
constraints: [],
92+
fdwoptions: [],
93+
location: 23,
94+
},
95+
),
96+
),
97+
},
98+
],
99+
inh_relations: [],
100+
partbound: None,
101+
partspec: None,
102+
of_typename: None,
103+
constraints: [],
104+
options: [],
105+
oncommit: OncommitNoop,
106+
tablespacename: "",
107+
access_method: "",
108+
if_not_exists: false,
109+
},
110+
),
111+
range: 54..85,
112+
},
113+
],
114+
}

0 commit comments

Comments
 (0)