PostgreSQL Connection String¶
Builds a PostgreSQL database connection URI from individual parameters. It concatenates host, port, database, username, and password, and conditionally appends schema and SSL options as query parameters. Designed as a helper to generate a ready-to-use connection string for downstream database nodes or external tools.
Usage¶
Use this node when you need a correctly formatted PostgreSQL connection string from separate inputs (e.g., for plugging into other database nodes or services). Typical workflow: provide your server details and credentials, choose SSL mode if needed, and pass the generated URI to nodes that accept a connection string.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| host | True | STRING | Database hostname or IP address. | localhost |
| port | True | INT | Database port number. Must be between 1 and 65535. | 5432 |
| database | True | STRING | Target database name. | postgres |
| username | True | STRING | Database user name. | postgres |
| password | True | PASSWORD | Database user password. Keep this secure. | |
| schema | True | STRING | Default schema to use. If set to 'public', it will not be added to the URI query. | public |
| sslmode | True | CHOICE | SSL connection mode. Only added to the URI if not 'disable'. | require |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | STRING | The constructed PostgreSQL connection string (URI). | postgresql://postgres: |
| json | STRING | JSON output (unused for successful construction; may contain error details on failure). | |
| html | HTML | HTML output (not used by this node; empty on success). | |
| xlsx | XLSX | XLSX output (not used by this node; empty on success). | |
| PDF output (not used by this node; empty on success). |
Important Notes¶
- The schema parameter is appended only when it is not 'public'.
- The sslmode parameter is appended only when it is not 'disable'.
- This node does not validate database connectivity; it only formats a connection string.
- If your username or password contains special characters, ensure they are URL-encoded before use.
- Handle secrets carefully. Avoid exposing passwords in logs, shared graphs, or UI screenshots.
Troubleshooting¶
- If downstream nodes fail to connect, verify host, port, database, username, and password are correct, and that the server is reachable.
- If authentication issues occur, confirm that sslmode matches your server's SSL requirements (e.g., 'require', 'verify-ca', or 'verify-full').
- If special characters in credentials cause parsing errors, URL-encode the username and password.
- If you see an error message in the JSON output slot, check for invalid or missing input values.