PostgreSQL
Interact with a PostgreSQL database from your workflow. Four node types are available for different operations. All require a PostgreSQL connection.
PostgreSQL nodes include a Schema field that MySQL does not have. This lets you work with tables in schemas other than public.
Postgres Query
Execute a SELECT query on a PostgreSQL database.
Configuration
| Field | Description | Notes |
|---|---|---|
| Postgres Connection | The PostgreSQL connection to use | Required. Select from your configured PostgreSQL connections. |
| Operation | Choose how many rows to return | Get Many (default) returns multiple rows. Get One returns only the first matching row. |
| Table | The table to query | Required. Select from tables available in the connected database. |
| Columns | Which columns to include in the results | Leave empty to return all columns. |
| Where | Filter conditions to narrow down results | See Where Conditions below. |
Get Many Options
These fields appear only when Operation is set to Get Many:
| Field | Description | Notes |
|---|---|---|
| Order By | Column to sort results by | Optional. |
| Direction | Sort direction | Ascending (default) or Descending. |
| Limit | Maximum number of rows to return | Optional. Must be at least 1. |
| Offset | Number of rows to skip | Optional. Useful for pagination. |
Additional Options
| Field | Description | Notes |
|---|---|---|
| Schema | The database schema to use | Defaults to public. Change this if your tables live in a different schema. |
| Output Decimals as Numbers | Convert string-encoded decimal values to numbers | Disabled by default. |
| Show Query Plan (EXPLAIN) | Return the query execution plan instead of results | Disabled by default. Useful for debugging slow queries. |
Output
Get Many returns a list of row objects. Get One returns a single row object, or an empty object if no match is found.
When Show Query Plan is enabled, the output contains a query_plan field with the PostgreSQL EXPLAIN output instead of the actual query results.
Postgres Insert
Insert data into a PostgreSQL database table.
Configuration
| Field | Description | Notes |
|---|---|---|
| Postgres Connection | The PostgreSQL connection to use | Required. |
| Table | The table to insert into | Required. |
| Column Mapping | Map input data to table columns | Each entry maps a table column to a value from upstream data. |
| On Conflict | What to do when a duplicate key is detected | Raise Error (default), Ignore (Skip), or Update Existing. |
| Conflict Columns | Columns that determine uniqueness | Appears when On Conflict is Ignore or Update Existing. |
| Schema | The database schema | Defaults to public. |
Output
| Field | Description |
|---|---|
success | true if the insert succeeded |
table | The name of the table |
inserted_data | The full inserted row (PostgreSQL returns all columns via RETURNING *) |
insert_id | The auto-generated ID (if applicable) |
Postgres Update
Update data in a PostgreSQL database table.
Configuration
| Field | Description | Notes |
|---|---|---|
| Postgres Connection | The PostgreSQL connection to use | Required. |
| Table | The table to update | Required. |
| Update Fields Mapping | Map new values to table columns | Each entry maps a column to the new value. |
| WHERE Conditions | Filter which rows to update | See Where Conditions below. |
| Allow NULL Values | Whether to include null or empty values | Disabled by default. When disabled, null/empty mapped values are skipped. |
| Require WHERE Conditions | Whether WHERE conditions are mandatory | Enabled by default. |
| Schema | The database schema | Defaults to public. |
Output
| Field | Description |
|---|---|
success | true if the update succeeded |
table | The name of the table |
affected_rows | Number of rows updated |
updated_data | The values that were set |
Postgres Delete
Delete data from a PostgreSQL database table.
Configuration
| Field | Description | Notes |
|---|---|---|
| Postgres Connection | The PostgreSQL connection to use | Required. |
| Table | The table to delete from | Required. |
| WHERE Conditions | Filter which rows to delete | See Where Conditions below. |
| Require WHERE Conditions | Whether WHERE conditions are mandatory | Enabled by default. |
| Schema | The database schema | Defaults to public. |
Output
| Field | Description |
|---|---|
success | true if the delete succeeded |
table | The name of the table |
affected_rows | Number of rows deleted |
Where Conditions
All PostgreSQL nodes use the same visual condition builder. Each condition has three parts:
- Column -- The column to filter on.
- Operation -- The comparison operator: equals, not equals, greater than, less than, greater than or equals, less than or equals, contains, starts with, ends with, in, not in, is null, is not null, is empty, is not empty.
- Value -- The value to compare against. Supports expressions that reference upstream node data.
Multiple conditions can be combined with AND or OR logic.
WARNING
Disabling Require WHERE Conditions on Update or Delete nodes allows the operation to affect every row in the table. Use with caution.
INFO
PostgreSQL and Supabase nodes share the same underlying engine. If you are using Supabase, consider using the Supabase nodes instead -- they work identically but make it easier to identify which connection type is being used in your workflow.
TIP
Use the Show Query Plan (EXPLAIN) option on the Query node to understand why a query is slow. The output shows the PostgreSQL execution plan, including which indexes are being used.