-
Notifications
You must be signed in to change notification settings - Fork 33
Deparser does not handle MergeWhenClause #292
Open
Description
import { parse, deparse } from 'pgsql-parser'; const sql = `MERGE INTO t AS target USING (SELECT 1 AS id) AS source ON target.id = source.id WHEN MATCHED THEN UPDATE SET name = 'x' WHEN NOT MATCHED THEN INSERT (id, name) VALUES (source.id, 'x')`; const ast = parse(sql); // succeeds deparse(ast); // throws: does not handle node type: MergeWhenClause
The parser handles MERGE (added in PostgreSQL 15) but the deparser has no visitor for MergeWhenClause. Tested on pgsql-deparser@17.18.2.
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.