PostgreSQL Execute¶
Runs non-SELECT SQL statements (INSERT, UPDATE, DELETE, DDL) against a PostgreSQL database using provided credentials. Loads credentials from a path, sends the SQL to the PostgreSQL service for execution, and returns a human-readable summary along with a JSON payload.

Usage¶
Use this node when you need to modify data or schema in PostgreSQL as part of a workflow (e.g., inserting new records, updating fields, deleting rows, creating tables). Typically, connect it after a credentials/connection provider and before any nodes that depend on the outcome of the write operation.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| credentials_path | True | Not specified | Path or reference to the stored PostgreSQL credentials to use for authentication. | |
| timeout | False | Not specified | Maximum time in seconds to wait for the execution request to complete before failing. | 60 |
| sql_text | True | STRING | The SQL statement to execute. Intended for INSERT/UPDATE/DELETE or other non-SELECT operations. | INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com') |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | Not specified | Human-readable execution summary (e.g., success message, affected rows). | PostgreSQL Execute Results: 3 rows affected |
| json | Not specified | Machine-readable JSON response from the execution, which may include status, affected row count, or error details. | {"status": "success", "row_count": 3} |
Important Notes¶
- Do not use this node for SELECT queries; use the PostgreSQL Query node instead.
- Ensure the provided credentials have sufficient privileges for the statements being executed.
- Long-running or large batch operations may require increasing the timeout input.
- The node formats results with a default text summary and a JSON payload; downstream nodes can parse the JSON for programmatic handling.
- Always validate and sanitize dynamic SQL to avoid accidental destructive operations.
Troubleshooting¶
- SQL syntax error: Verify the sql_text statement compiles in your database and includes correct schema/table names.
- Permission denied: Confirm the credentials have the required INSERT/UPDATE/DELETE or DDL privileges.
- Timeouts: Increase the timeout input or optimize the query/operation to complete faster.
- Invalid credentials path: Make sure credentials_path points to a valid and accessible credential file/reference.
- No rows affected: Confirm WHERE clauses and target tables; test the statement directly in the database to verify expected impact.