brianbroderick / lantern

Shine a light on your PG query logs. The project is being reimagined and is now a WIP.
Apache License 2.0
2 stars 0 forks source link

Parser: Squash VALUES clauses better #39

Closed brianbroderick closed 2 months ago

brianbroderick commented 3 months ago

INSERT INTO my_table (id, ...other_columns...) VALUES (nextval('?'), ?, ?, ?, ?, ?, ?, '?', ?, '?'), (nextval('?'), ?, ?, ?, ?, ?, ?, '?', ?, '?'), (nextval('?'), ?, ?, ?, ?, ?, ?, '?', ?, '?'), (nextval('?'), ?, ?, ?, ?, ?, ?, '?', ?, '?'), (nextval('?'), ?, ?, ?, ?, ?, ?, '?', ?, '?'), (nextval('?'), ?, ?, ?, ?, ?, ?, '?', ?, '?'), (nextval('?'), ?, ?, ?, ?, ?, ?, '?', ?, '?') RETURNING id;

Each row in VALUES should be squashed down to a single row.

brianbroderick commented 2 months ago

f55ccadc0e5783d4fd4e2049a4079fc1dd551913