Tillbaka till ändringsloggen
Databases·

Edit your always-on database from the panel

Always-on PostgreSQL databases now have a Data tab for browsing tables, editing rows, and running SQL that writes — all inside one transaction.

An always-on database's page is now split into Overview and Data. Overview is everything that was there before — engine, region, size, connection details. Data is new, and unlike the read-only browser on scales-to-zero databases, this one can change things.

Browse and edit

Tables lists every table and view your database user can read. Pick one to page through its rows and click a column heading to sort by it.

Rows are editable in place. Add row opens a form for every column, Edit opens the same form filled in, and each row has a delete button behind a confirmation. Columns you do not touch keep their value — or take their default, when you are adding a row — so you can change one field without restating the rest. Nullable columns have a Set to null box, because an empty string and a null are different values and a form that cannot tell them apart cannot edit such a column at all.

Editing needs a way to name one row rather than everything that looks like it, which means a primary key. Tables without one are still browsable, and the tab says so and points you at the SQL tab, where you choose the WHERE clause yourself.

SQL that writes

The SQL tab runs whatever you type — SELECT, INSERT, ALTER TABLE, the lot — against your live data. Ctrl / Cmd + Enter runs it.

You can paste several statements separated by semicolons, and they all run inside one transaction. If any statement fails, none of them are applied and the database is exactly as it was. Each statement reports what it did: rows returned for a read, rows affected for a write.

Two limits keep a panel query from disturbing the application sharing the database: a statement is stopped if it runs longer than a few seconds, and a write that is waiting on a lock gives up quickly rather than holding the request open. A WHERE clause and a LIMIT keep you inside both.

Who can change things

Browsing and read-only queries are available to everyone who can see the project. Editing rows and running statements that write require write access — viewers see the tables and the read-only query box, and no edit controls.

Members without write access, and anyone on a scales-to-zero database, get the read-only console exactly as before.

See the Databases guide for the details.