Skip to main content

Get started with PG Studio

Run your first queries in the SQL editor, and explore your tables and schema in Tables.

note

PG Studio and its AI features are on by default, so no setup is needed. To turn them off, see Manage PG Studio and AI features.

Prerequisites​

To use PG Studio, you need:

  • Aiven permissions: The service:data:write and service:secrets:read permissions at the organization, unit, or project level. These permissions are included in the Admin, Developer, and Operator roles.
  • Network access: Your IP address must be in the service's IP allowlist. PG Studio validates your browser's IP address, which must be allowed in the service's IP filter configuration. If you get the Access is not allowed from the IP address error, add your IP address to the allowlist.

Open PG Studio tools​

  1. In the Aiven Console, open your Aiven for PostgreSQL service.
  2. In the left-hand menu, click one of the following:
    • SQL editor: Write and run SQL queries.
    • Tables: Browse tables and open the schema map.
    • Extensions: Enable, update, and disable extensions.
  3. Select the source database.

If AI features are off for your organization, the AI Assistant panel does not appear in the SQL editor.

Run your first query​

You can write SQL directly. If AI features are on, you can also use the AI Assistant to generate queries:

Write SQL manually​

  1. In the SQL editor, enter your query, for example:

    SELECT * FROM users LIMIT 10;
  2. Click Run.

  3. View the results in the results panel.

Generate SQL with AI​

  1. In the AI Assistant panel, describe what you need, for example: Show all users who signed up in the last 7 days.
  2. Review the generated SQL in the SQL editor.
  3. Click Run to execute the query.

Explore your tables​

  1. In the left-hand menu, click Tables.
  2. Select the source database. The table list shows the tables of that database, grouped by schema.
  3. Click a table. The table opens in its own tab and shows up to 100 rows.

Explore your schema​

  1. In the left-hand menu, click Tables.
  2. Click Open schema map. The schema map opens in its own tab and shows your database structure as an interactive diagram.
  3. Browse tables, columns, and relationships.

Related pages