FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(postgres): run Table Browser / SQL DML as separate statements, not one extended-protocol script · Issue #784 · QueryaHub/Querya-Desktop · GitHub

fix(postgres): run Table Browser / SQL DML as separate statements, not one extended-protocol script #784

Description

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

  1. Open a Postgres table with a PK, edit a cell, Save, confirm the DML preview.
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend database driver execution and queriesbugSomething isn't workingdata-gridInteractive data grid, cell editor, filtering, groupings

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL