terrymanu commented on issue #35093:
URL:
https://github.com/apache/shardingsphere/issues/35093#issuecomment-3671295708
## Issue Understanding
- In shardingsphere-proxy 5.5.2 (PostgreSQL protocol, backend PostgreSQL
17.2), sending DROP TABLE ...; CREATE TABLE ...; in a single PQexec fails with
a syntax error, while splitting into two PQexec calls or connecting directly to
PostgreSQL works. You want the official documentation reference that states
multi-statement execution is not supported.
## Root Cause
- The Proxy’s PostgreSQL frontend treats Simple Query (PQexec default) as
a single SQL. It does not implement semicolon splitting or multi-statement
execution, so the combined string is parsed as one statement and fails. The
trailing “, null” is from the Proxy error message template appending an empty
reason string.
## Analysis
- The official English documentation explicitly lists this limitation:
- docs/document/content/features/sharding/limitation.en.md, section
“Semicolons separate multiple statements”: “Not support simultaneous execution
of multiple SQL statements separated by ;.”
- DistSQL rule statements and table DDL are expected to be sent one by one
to keep parsing, routing, and metadata broadcasting correct.
## Conclusion
- This is a known functional limitation, not a Proxy bug. Please keep DROP
TABLE and CREATE TABLE as separate statements (multiple PQexec calls or
client-side splitting).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]