PostgreSQL Credential - Database Connection
What is a PostgreSQL Credential
Section titled “What is a PostgreSQL Credential”A PostgreSQL credential allows your workflows to execute SQL queries, read and write data in a PostgreSQL database. It is used with SQL query nodes.
Configuration Fields
Section titled “Configuration Fields”| Field | Description | Example |
|---|---|---|
| Host | Database server address | db.example.com or localhost |
| User | Database username | postgres |
| Password | User password | my_password |
| Database | Database name | my_database |
| Port | Connection port (default: 5432) | 5432 |
| SSL | Enable SSL encryption for the connection | true |
How to Get Connection Details
Section titled “How to Get Connection Details”Local Database
Section titled “Local Database”Host: localhost or 127.0.0.1Port: 5432User: postgres (or your user)Password: the password you set when installing PostgreSQLDatabase: your database nameCloud Services
Section titled “Cloud Services”Amazon RDS:
- Go to AWS Console > RDS > Your instance
- Copy the Endpoint (this is the Host)
- Default port is 5432
- Use the username and password you set when creating the instance
Supabase:
- Go to your project on supabase.com
- Navigate to Settings > Database
- Copy the direct connection details
Railway / Render / Heroku:
- Go to the database section of your project
- Look for the connection string or individual details
- Copy host, user, password, database, and port
- Cloud services: Generally require SSL enabled (
true) - Local database: Generally doesn’t need SSL (
false) - For connections with custom SSL certificates, use the PostgreSQL SSL credential
Troubleshooting
Section titled “Troubleshooting”Connection Error
Section titled “Connection Error”- Verify the host and port are correct
- Make sure the database accepts remote connections (check
pg_hba.conf) - Check that the firewall allows connections to port 5432
Authentication Failed
Section titled “Authentication Failed”- Verify username and password
- Make sure the user has permissions on the specified database
SSL Required
Section titled “SSL Required”- Enable the SSL option in the credential
- Some cloud providers require SSL mandatorily