mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-08 01:15:00 +00:00
Fix extra whitespace printed before ON CONFLICT
(#1037)
This commit is contained in:
parent
c887c4e545
commit
5a3f19310e
2 changed files with 6 additions and 6 deletions
|
@ -1428,7 +1428,7 @@ fn parse_prepare() {
|
|||
fn parse_pg_on_conflict() {
|
||||
let stmt = pg_and_generic().verified_stmt(
|
||||
"INSERT INTO distributors (did, dname) \
|
||||
VALUES (5, 'Gizmo Transglobal'), (6, 'Associated Computing, Inc') \
|
||||
VALUES (5, 'Gizmo Transglobal'), (6, 'Associated Computing, Inc') \
|
||||
ON CONFLICT(did) \
|
||||
DO UPDATE SET dname = EXCLUDED.dname",
|
||||
);
|
||||
|
@ -1458,7 +1458,7 @@ fn parse_pg_on_conflict() {
|
|||
|
||||
let stmt = pg_and_generic().verified_stmt(
|
||||
"INSERT INTO distributors (did, dname, area) \
|
||||
VALUES (5, 'Gizmo Transglobal', 'Mars'), (6, 'Associated Computing, Inc', 'Venus') \
|
||||
VALUES (5, 'Gizmo Transglobal', 'Mars'), (6, 'Associated Computing, Inc', 'Venus') \
|
||||
ON CONFLICT(did, area) \
|
||||
DO UPDATE SET dname = EXCLUDED.dname, area = EXCLUDED.area",
|
||||
);
|
||||
|
@ -1497,7 +1497,7 @@ fn parse_pg_on_conflict() {
|
|||
|
||||
let stmt = pg_and_generic().verified_stmt(
|
||||
"INSERT INTO distributors (did, dname) \
|
||||
VALUES (5, 'Gizmo Transglobal'), (6, 'Associated Computing, Inc') \
|
||||
VALUES (5, 'Gizmo Transglobal'), (6, 'Associated Computing, Inc') \
|
||||
ON CONFLICT DO NOTHING",
|
||||
);
|
||||
match stmt {
|
||||
|
@ -1516,7 +1516,7 @@ fn parse_pg_on_conflict() {
|
|||
|
||||
let stmt = pg_and_generic().verified_stmt(
|
||||
"INSERT INTO distributors (did, dname, dsize) \
|
||||
VALUES (5, 'Gizmo Transglobal', 1000), (6, 'Associated Computing, Inc', 1010) \
|
||||
VALUES (5, 'Gizmo Transglobal', 1000), (6, 'Associated Computing, Inc', 1010) \
|
||||
ON CONFLICT(did) \
|
||||
DO UPDATE SET dname = $1 WHERE dsize > $2",
|
||||
);
|
||||
|
@ -1553,7 +1553,7 @@ fn parse_pg_on_conflict() {
|
|||
|
||||
let stmt = pg_and_generic().verified_stmt(
|
||||
"INSERT INTO distributors (did, dname, dsize) \
|
||||
VALUES (5, 'Gizmo Transglobal', 1000), (6, 'Associated Computing, Inc', 1010) \
|
||||
VALUES (5, 'Gizmo Transglobal', 1000), (6, 'Associated Computing, Inc', 1010) \
|
||||
ON CONFLICT ON CONSTRAINT distributors_did_pkey \
|
||||
DO UPDATE SET dname = $1 WHERE dsize > $2",
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue