Summary
postgres_sql_workspace._applyStagedChanges calls generateMutationPlan() without primaryKeys or columnDataTypes. TableMutationEngine then builds WHERE from every displayed column. SqlTableTargetExtractor skips JOIN but not FROM a, b — UPDATE hits the first table with join-shaped values. If extract fails, the table name is the literal table.
Same execute path as Table Browser (toTransactionSql() in one execute).
Scope
- Resolve target via getTableSchema (schema + table from a simple FROM). If no PK or the query is not a single-table SELECT, disable Save (same as custom SQL on Table Browser).
- Pass columnDataTypes into the plan.
- Reject comma-from / subquery / VALUES as mutation targets.
- Widget/unit tests: JOIN and FROM a, b do not produce DML; simple SELECT * FROM public.t uses the PK.
Out of scope
- Table Browser PK path (already wired; still blocked by the multi-statement execute issue).
- SQLite/MySQL result-grid Save (same class of bug — mention in PR if the helper is shared).
Reactions are currently unavailable
Summary
postgres_sql_workspace._applyStagedChanges calls generateMutationPlan() without primaryKeys or columnDataTypes. TableMutationEngine then builds WHERE from every displayed column. SqlTableTargetExtractor skips JOIN but not FROM a, b — UPDATE hits the first table with join-shaped values. If extract fails, the table name is the literal table.
Same execute path as Table Browser (toTransactionSql() in one execute).
Scope
Out of scope