Skip to main content
Use the native PostgreSQL endpoint to query a SQLWorkspace. This guide uses psql as an example, but you can use any PostgreSQL-compatible client.

Before you begin

You need:
  • A Ready SQLWorkspace and SQLCatalog.
  • The native PostgreSQL hostname published for the workspace.
  • A SQL username and password.
  • A PostgreSQL-compatible client that supports TLS and hostname verification.

Get the connection details

  1. In the Cloud Console, click SQL and open the SQLWorkspace.
  2. Open the workspace Settings page.
  3. Copy the native PostgreSQL hostname. Do not derive or guess the hostname.
  4. Record the target database and username, and obtain the password through the approved credential workflow.
Native PostgreSQL endpoint on the SQLWorkspace Settings page

Copy the native PostgreSQL endpoint for a SQLWorkspace.

Connection settings

Connect with psql

Run the following command. Omit the password so that psql prompts for it securely:
Do not put the password in the URI, shell history, application logs, or screenshots. After connecting, inspect the session:

Verify CRUD operations

Use a uniquely named test table so that you do not affect an existing object:
Creating or deleting engine objects requires the corresponding engine privileges. During Private Preview, Organization Admin users (org-admin, or legacy admin) are synchronized as engine superusers.

Use another PostgreSQL-compatible client

Clients such as DBeaver, DataGrip, pgAdmin, JDBC applications, and psycopg use the same connection fields. Configure the published host, port 4567, database, username, password, and certificate-verifying TLS mode. PostgreSQL wire compatibility does not mean that every PostgreSQL server feature is available. See RisingWave for the engine-specific SQL model.