Compose Database-as-a-Service Help and Documentation

Everything you need to know about Compose, Hosted or Enterprise, is here in our help system. Whether you run one database for your businesses' sole application or six different databases to support an entire corporation, we've got the information you need.

Data Browser for PostgreSQL

Overview

The PostgreSQL data browser provides a management tool for your deployment in the Compose Console. Listed are all the databases in your deployment along with their size. The default database at deployment creation is named compose.

Database list on the data browser page.

If you wish to create other databases, click on the Create Database button in the upper-right. More information about database creation is covered in the PostgreSQL FAQ.

The Sidebar

Clicking on a database name brings up a list of all the tables in that database, and a sidebar appears on the left for viewing and managing your data.

Tables

Click on a table name to manage the data within it. The tabs along the top provide a few useful table functions.

Query

Query provides a SELECT statement for finding rows in the current table. The default query is to select LIMIT 20 rows from all rows in the table. The optional fields WHERE, ORDER BY, and OFFSET are toggled buttons and results are displayed below.

Running a SELECT command from the browser.

To add a new row to the table, click on the Insert Row button in the upper-right.

Adding a row through the browser.

If a table has a primary key, then it is possible to update the row or delete the row entirely by clicking on it. This is not available on tables without a primary key.

Indexes

On the Indexes tab, there is a list of all the indexes on the current table and the option to drop the index. A new index can be created with the CREATE INDEX command.

Running CREATE INDEX through the browser.

The provided command automatically uses the CONCURRENTLY option, which does not lock out writes while the index is created. The option UNIQUE is toggled by button, and if you like to supply a name for the index click on the name button.

Settings

The Settings tab allows you to DROP TABLE on the current table and/or any views or other objects that depend on it. Please ensure you have backups before using the DROP TABLE button.

SQL

PL/pgSQL is installed by default, and SQL provides a query editor to run a single statement or series of statements. Once run, the individual statement outputs and results will be displayed below. For example, to create a new table in the database use CREATE TABLE and click the run button.

The SQL Query editor.

If you need to save a query for later use, name it and it will appear in a list on the right under Saved Queries. Clicking on the query name opens it in the editor where it can be modified, re-saved, or deleted.

Editing a saved query.

Extensions

This list of packages can be added to PostgreSQL to extend functionality. By default the only installed package is PL/pgSQL. More information on extensions can be found in the PostgreSQL FAQ.

Performance

The information in Performance is a set of tabs based on the performance dashboard for PostgreSQL pgHero.

  • The Overview tab shows cache performance.
  • The Disk usage tab shows stats like the last VACUUM, autovacuum, ANALYZE, and automated ANALYZE command was run. It also displays the results from some of the database bloat and index bloat queries.
  • The Conncetions tab has information on current open connections to the database, the ability to kill them, and a list of active queries.
  • The Slow queries tab, with pg_stat_statements installed, will show queries slower than 20ms.

Roles

Roles lets you manage users for your database. Existing users and their permissions are listed, with the ability to Drop a user via button on the right. To create a new user, click on Add User in the upper-right. At the CREATE ROLE type the user name and password into the fields and set the roles with the LOGIN, CREATEDB, CREATEROLE buttons below.

Admin

The ultimate in administrative power, you can drop a database from here. Use wisely; clicking on the Delete Database button will delete the database and all the rows inside it.


###Still Need Help?

If this article didn't solve things, summon a human and get some help.

Updated 11 months ago

Data Browser for PostgreSQL


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.