Skip to main content

Manage queries in PG Studio

Save useful SQL in the SQL editor, so you can reopen and rerun queries without rewriting them.

Save queries​

Save a query so you can open and run it again later. Saved queries are user-specific. Other users in the same Aiven for PostgreSQL service can't see your saved queries.

To save a query:

  1. In the SQL editor, write or generate your query.
  2. Run the query and verify the result.
  3. Click Save.

The query is saved under the current tab name and appears in Saved queries.

Open saved queries​

To open a saved query:

  1. In the SQL editor, click Saved queries.
  2. Select a query from the list to load it into the editor.
  3. Click Run to execute the query.

Rename saved queries​

To rename a saved query:

  1. Click Saved queries.
  2. Select a query from the list.
  3. Double-click the query tab name, enter a new name, and press Enter.

Delete saved queries​

To delete a saved query:

  1. Click Saved queries.
  2. Select a query from the list.
  3. Click Delete to remove the query from your saved list.
note

Deleting a query removes it only from your saved queries list in the editor. It does not delete any database objects created earlier by running SQL in your database.

Related pages