This package exists to take a string containing multiple Postgres SQL statements, separated by semicolons, and split it into its constituent statement

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-05-08 12:30:06

This package exists to take a string containing multiple Postgres SQL statements, separated by semicolons, and split it into its constituent statements.

This isn't trivial, because semicolons may occur in double-quoted identifiers, ordinary strings, 'escape' strings, continuation strings, dollar-quoted strings, single-line comments, and (nestable) multi-line comments, and in all these cases they do not separate statements.

Leave a Comment