PostgreSQL Connection String¶
Constructs a PostgreSQL connection URI from discrete parameters (host, port, database, username, password, schema, sslmode). It concatenates these inputs into a standard postgresql:// URL and appends optional query parameters when specified.

Usage¶
Use this node whenever you need a correctly formatted PostgreSQL connection string for downstream database nodes or external tools. Provide your server details and credentials; the node outputs the URI in the text slot, ready to pass to connection or query nodes.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| host | True | STRING | Database hostname or IP address. | db.example.com |
| port | True | INT | Database port number (1–65535). | 5432 |
| database | True | STRING | Target database name. | app_db |
| username | True | STRING | Database user name. | postgres |
| password | True | PASSWORD | Database password for the provided user. | |
| schema | True | STRING | Default schema to target. If set to "public", it will not be added to the URI as a parameter. | public |
| sslmode | True | ["disable", "require", "verify-ca", "verify-full"] | SSL mode for the connection. Append as a query parameter if not "disable". | require |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | STRING | The constructed PostgreSQL connection string in the form postgresql://username:password@host:port/database with optional ?schema= and/or &sslmode= parameters. | postgresql://postgres: |
| json | STRING | Empty output for this node (not used). | |
| html | STRING | Empty output for this node (not used). | |
| xlsx | BYTES | Empty output for this node (not used). | |
| BYTES | Empty output for this node (not used). |
Important Notes¶
- Password safety: Do not expose real passwords in logs, prompts, or shared outputs. Use placeholders like "
" in examples. - Schema handling: The schema parameter is only appended when it is not "public".
- SSL mode: The sslmode parameter is appended only when not "disable". Choose the correct mode according to your server's TLS configuration.
- Special characters: If the username or password contains special characters (e.g., @, /, :, ?), URL-encode them before use to avoid invalid URIs.
- Validation: This node only constructs the URI; it does not validate connectivity or credentials.
Troubleshooting¶
- Cannot connect using the URI: Verify the host, port, and database are reachable and correct. Ensure firewall and network rules allow access.
- Authentication failed: Confirm the username/password are correct for the target database. If special characters are present, URL-encode them.
- SSL errors: If the server requires TLS, set sslmode to "require" or stricter. For certificate validation, use "verify-ca" or "verify-full" and ensure certificates are configured on the client.
- Wrong default schema used: If queries hit the wrong schema, set the schema input to the desired value (not "public") so it is appended to the connection string.