Oliver Jowett <oliver@opencloud.com> writes:
> Technically, "SELECT foo;" is two statements, "SELECT foo" and "", as
> JDBC doesn't require a statement terminator. The (simple-minded) JDBC
> query parser doesn't do anything special to ignore trailing empty
> statements.
FWIW, the backend's parser does go out of its way to discard empty
statements (a/k/a useless semicolons). I do not know how hard it would
be to teach JDBC's parser to do likewise, but it might be worth the
trouble if not too painful.
regards, tom lane