Files
supabase/apps/docs/content/guides/database/psql.mdx
T
CharisandChris Chinchilla 47705a8968 chore: replace all supabase urls with relative urls (#38537)
* fix: rewrite relative URLs when syncing to GitHub discussion

Relative URLs back to supabse.com won't work in GitHub discussions, so
rewrite them back to absolute URLs starting with https://supabase.com

* fix: replace all supabase urls with relative urls

* chore: add linting for relative urls

* chore: bump linter version

* Prettier

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2025-09-09 12:54:33 +00:00

25 lines
1009 B
Plaintext

---
id: 'psql'
title: 'Connecting with PSQL'
breadcrumb: 'GUI Quickstarts'
hideToc: true
---
[`psql`](https://www.postgresql.org/docs/current/app-psql.html) is a command-line tool that comes with Postgres.
## Connecting with SSL
You should connect to your database using SSL wherever possible, to prevent snooping and man-in-the-middle attacks.
You can obtain your connection info and Server root certificate from your application's dashboard:
![Connection Info and Certificate.](/docs/img/database/database-settings-ssl.png)
Download your [SSL certificate](#connecting-with-ssl) to `/path/to/prod-supabase.cer`.
Find your connection settings. Go to the project [**Connect** panel](/dashboard/project/_?showConnect=true) and copy the URL from the `Session pooler` section, and copy the parameters into the connection string:
```shell
psql "sslmode=verify-full sslrootcert=/path/to/prod-supabase.cer host=[CLOUD_PROVIDER]-0-[REGION].pooler.supabase.com dbname=postgres user=postgres.[PROJECT_REF]"
```