1. Copy the connection string
- Open your project at supabase.com/dashboard.
- Click Connect at the top of the page.
- Under Connection string, choose Session pooler.
- Copy the URI and replace
[YOUR-PASSWORD]with your database password (Project Settings → Database if you need to reset it).
It looks like this:
postgresql://postgres.abcdefghijkl:YOUR-PASSWORD@aws-0-eu-central-1.pooler.supabase.com:5432/postgres?sslmode=require
2. Paste it into pgquery
Open the app, paste the string into the connection form and press Connect. Your tables are under the public schema; Supabase's own schemas (auth, storage) are listed too.
Which string to use
- Session pooler, port 5432: use this one. It works over IPv4 and supports everything pgquery does.
- Direct connection (
db.<ref>.supabase.co): IPv6 only unless you bought the IPv4 add-on, so it often fails from Docker and many servers. - Transaction pooler, port 6543: avoid. It doesn't keep prepared statements between queries, which pgquery uses.
Common errors
| If you see | Do this |
|---|---|
dial tcp [2a05:…]:5432: connect: network is unreachable | You used the direct connection, which is IPv6-only. Switch to the session pooler string. |
prepared statement "stmtcache_…" already exists (SQLSTATE 42P05) | You used the transaction pooler (port 6543). Use the session pooler on port 5432. |
password authentication failed for user "postgres" | Check the password, and that the user is postgres.<your-project-ref> for the pooler. |
Tenant or user not found | The project ref in the user name or the region in the host is wrong. Copy the string again from Connect. |
Good practice
For day-to-day browsing, create a role with only the rights you need instead of using postgres. Remember that the postgres role bypasses Row Level Security, so what you see is not what your app's users see. Test policies with SET ROLE authenticated; in the SQL editor.