SqlScript
object SqlScript
Cuts a script into the statements it is made of.
PostgreSQL takes a whole script in one message and runs it inside an implicit transaction, which is what is wanted right up until one of the statements is CREATE INDEX CONCURRENTLY, VACUUM, or anything else the server refuses inside a transaction block. Those have to arrive one message at a time, and sending them one at a time means knowing where each one ends.
Nothing here parses SQL. A statement is the text between separators; whether the server will accept it is the server's answer to give.