Safe mode and review in PostgreSQL

Use PostgreSQL safe mode, review generated SQL and block stale row writes with xmin before commit.

PostgreSQL connections expose read-only and safe mode alongside the connection metadata. The three safe-mode choices are dangerous (default), confirm writes and confirm all.

Choose the protection level

  1. Use dangerous (default) when you are working against a disposable database and want the current behavior.
  2. Use confirm writes when INSERT, UPDATE, DELETE and DDL should require an explicit confirmation.
  3. Use confirm all when even SELECT runs need confirmation.

The form shows the explanation for the selected mode. Marking a connection read-only is a separate decision: it is useful for exploration and should be set on connections that must not be used for writes.

Review the generated SQL

A grid edit stays staged until you choose to save pending changes. The Code Review — SQL to run panel shows the operation, the changed values and the identity predicate. For an update with a captured PostgreSQL row version, the generated SQL contains the equivalent of AND xmin = E'<version>'::xid.

The running operation uses bound values; the SQL text shown for review is a readable representation. This keeps the review honest without turning displayed values into executable SQL.

What happens when the row changed

The application reads xmin with the row. Another session can update the row after you load it, which produces a new version. At commit time, the WHERE clause no longer matches. Tablyne rejects the operation and rolls back the batch rather than applying only the rows that happened to remain current.

Use Ctrl+S to save pending changes, Ctrl+Z to undo a staged edit and Ctrl+Y to redo it. If a statement is better expressed as SQL, switch to the query console and run it with Ctrl+Enter after checking the target.