Skip to content

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

FieldDescriptionNotes
Postgres ConnectionThe PostgreSQL connection to useRequired. Select from your configured PostgreSQL connections.
OperationChoose how many rows to returnGet Many (default) returns multiple rows. Get One returns only the first matching row.
TableThe table to queryRequired. Select from tables available in the connected database.
ColumnsWhich columns to include in the resultsLeave empty to return all columns.
WhereFilter conditions to narrow down resultsSee Where Conditions below.

Get Many Options

These fields appear only when Operation is set to Get Many:

FieldDescriptionNotes
Order ByColumn to sort results byOptional.
DirectionSort directionAscending (default) or Descending.
LimitMaximum number of rows to returnOptional. Must be at least 1.
OffsetNumber of rows to skipOptional. Useful for pagination.

Additional Options

FieldDescriptionNotes
SchemaThe database schema to useDefaults to public. Change this if your tables live in a different schema.
Output Decimals as NumbersConvert string-encoded decimal values to numbersDisabled by default.
Show Query Plan (EXPLAIN)Return the query execution plan instead of resultsDisabled 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

FieldDescriptionNotes
Postgres ConnectionThe PostgreSQL connection to useRequired.
TableThe table to insert intoRequired.
Column MappingMap input data to table columnsEach entry maps a table column to a value from upstream data.
On ConflictWhat to do when a duplicate key is detectedRaise Error (default), Ignore (Skip), or Update Existing.
Conflict ColumnsColumns that determine uniquenessAppears when On Conflict is Ignore or Update Existing.
SchemaThe database schemaDefaults to public.

Output

FieldDescription
successtrue if the insert succeeded
tableThe name of the table
inserted_dataThe full inserted row (PostgreSQL returns all columns via RETURNING *)
insert_idThe auto-generated ID (if applicable)

Postgres Update

Update data in a PostgreSQL database table.

Configuration

FieldDescriptionNotes
Postgres ConnectionThe PostgreSQL connection to useRequired.
TableThe table to updateRequired.
Update Fields MappingMap new values to table columnsEach entry maps a column to the new value.
WHERE ConditionsFilter which rows to updateSee Where Conditions below.
Allow NULL ValuesWhether to include null or empty valuesDisabled by default. When disabled, null/empty mapped values are skipped.
Require WHERE ConditionsWhether WHERE conditions are mandatoryEnabled by default.
SchemaThe database schemaDefaults to public.

Output

FieldDescription
successtrue if the update succeeded
tableThe name of the table
affected_rowsNumber of rows updated
updated_dataThe values that were set

Postgres Delete

Delete data from a PostgreSQL database table.

Configuration

FieldDescriptionNotes
Postgres ConnectionThe PostgreSQL connection to useRequired.
TableThe table to delete fromRequired.
WHERE ConditionsFilter which rows to deleteSee Where Conditions below.
Require WHERE ConditionsWhether WHERE conditions are mandatoryEnabled by default.
SchemaThe database schemaDefaults to public.

Output

FieldDescription
successtrue if the delete succeeded
tableThe name of the table
affected_rowsNumber 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.