Summary
Postgres Table Browser Save and the SQL result-grid Save send plan.toTransactionSql() (BEGIN; UPDATE …; COMMIT;) in a single Connection.execute. The postgres 3.5 default is QueryMode.extended (Parse/Bind). PostgreSQL rejects multiple commands in one prepared statement: cannot insert multiple commands into a prepared statement.
SQLite and MySQL already run BEGIN / each statement / COMMIT as separate executes. Autocommit-off SQL prepends BEGIN;\n + user SQL the same broken way.
Repro
- Open a Postgres table with a PK, edit a cell, Save, confirm the DML preview.
- Expected: transaction commits. Actual: driver/server error; staging may still look dirty or the UI may claim failure.
Scope
- Execute like SQLite (sqlite_table_view) / MySQL: BEGIN, each stmt.sql, COMMIT, ROLLBACK on error — or connection.runTx.
- Do not send toTransactionSql() through extended-protocol execute.
- Autocommit-off SQL: run BEGIN as its own statement, then the user SQL. Do not concatenate.
- Tests: apply a one-cell UPDATE against docker/postgres (or a fake that asserts execute is called N times, not once with BEGIN;).
Out of scope
Reactions are currently unavailable
Summary
Postgres Table Browser Save and the SQL result-grid Save send plan.toTransactionSql() (BEGIN; UPDATE …; COMMIT;) in a single Connection.execute. The postgres 3.5 default is QueryMode.extended (Parse/Bind). PostgreSQL rejects multiple commands in one prepared statement: cannot insert multiple commands into a prepared statement.
SQLite and MySQL already run BEGIN / each statement / COMMIT as separate executes. Autocommit-off SQL prepends BEGIN;\n + user SQL the same broken way.
Repro
Scope
Out of scope