> For the complete documentation index, see [llms.txt](https://connectyai.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://connectyai.gitbook.io/documentation/getting-started/data-connections-guide/postgresql.md).

# PostgreSQL

{% embed url="<https://www.youtube.com/watch?v=ZwlXNllncXw>" %}

As a best practice, create a dedicated PostgreSQL user with only the privileges needed for your Connecty integration and configure SSL mode to meet your security requirements. This isolates your integration credentials and simplifies permission management, ensuring a seamless no-code connection.

### Prerequisites

* **Host**
* **Port** (default: 5432)
* **Username** and **Password**
* **Database Name**
* *(Optional)* **SSL Mode**

### 1. Host and Port

Your PostgreSQL **Host** is the address of the server where your database is running.

{% hint style="info" %}

* This can be an IP address (`192.168.1.100`) or a hostname (`myaurora.cluster-c25.us-east-1.rds.amazonaws.com`).
* The **Port** is usually `5432` unless your administrator has configured a custom port.
* ✅ Host: `db.mycompany.com`
* ✅ Port: `5432`
* ❌ Host: `postgres://db.mycompany.com` (do **not** include the protocol in the host field)
  {% endhint %}

### 2. Username and Password

These credentials authenticate you to the database.

* **Username**: the database user name.
* **Password**: the password associated with that user.

### 3. Database Name

The **Database Name** is the specific database you want to connect to on the server.

{% hint style="info" %}
You can list available databases via the `\l` command in `psql` or by querying:\
\
`SELECT datname FROM pg_database WHERE datistemplate = false;`
{% endhint %}

### 4. SSL Mode (Optional)

Controls whether and how SSL/TLS is used for the connection. Common values:

* `disable` : no SSL (not recommended).
* `require` : SSL is required, but the server certificate is **not** verified.
* `verify-ca` : SSL required and server certificate **must** be signed by a trusted CA.
* `verify-full` : SSL required and server hostname **must** match certificate.

For `verify-ca` and `verify-full` options please contact our support.

{% hint style="info" %}
If you don’t specify SSL Mode, most clients default to \`disable\`.
{% endhint %}
