split sql query into statements #250
-
I'm writing own admin interface for postgres which should be able to execute multistatement sql script. I need to execute intermediate statement between user script statements to resolve typeoids, so I cannot just use simple query protocol. I need to split user script into statements and use extended query protocol. Can I use pglite somehow to parse multistatement script and split it into statements? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
PGlite doesn't expose a query parser api, and so I'm not sure it helps with this problem over other solutions. I would look at https://github.com/launchql/pgsql-parser (there is a maintained WASM version of this, but my Google foo is failing me) |
Beta Was this translation helpful? Give feedback.
PGlite doesn't expose a query parser api, and so I'm not sure it helps with this problem over other solutions.
I would look at https://github.com/launchql/pgsql-parser (there is a maintained WASM version of this, but my Google foo is failing me)