We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7252e40 commit f34cdc9Copy full SHA for f34cdc9
1 file changed
reshape.go
@@ -389,6 +389,18 @@ func reshapeNode(n *pg_query.Node) {
389
reshapeUpdate(v.UpdateStmt)
390
case *pg_query.Node_DeleteStmt:
391
reshapeDelete(v.DeleteStmt)
392
+ case *pg_query.Node_InsertStmt:
393
+ reshapeInsert(v.InsertStmt)
394
+ }
395
+}
396
+
397
+// reshapeInsert canonicalizes an INSERT ... SELECT body; VALUES is a no-op
398
+func reshapeInsert(i *pg_query.InsertStmt) {
399
+ if i == nil || i.SelectStmt == nil {
400
+ return
401
402
+ if s, ok := i.SelectStmt.Node.(*pg_query.Node_SelectStmt); ok {
403
+ reshapeSelect(s.SelectStmt)
404
}
405
406
0 commit comments