Skip to main content
The PostgreSQL node adds PostgreSQL operations to your workflows. Add it on the canvas or ask the AI builder for it by name, then pick an operation and fill in its fields.
You can wire the PostgreSQL node into an AI agent as a tool provider: the agent calls the operations you allow. See Agent tools.

Credentials

Connect PostgreSQL under Credentials in the node settings. See Connecting credentials for the general flow.

Postgres connection string

Enter the values manually when creating the credential.

Postgres credentials

Enter the values manually when creating the credential.

Operations

Database

OperationIDDescription
List Databaseslist_databasesList all databases in the PostgreSQL server

Extension

OperationIDDescription
Install Extensioninstall_extensionCreate/install an extension
List Extensionslist_extensionsList all installed extensions

Function

OperationIDDescription
Call Database Functioncall_database_functionCall a PostgreSQL function
List Schema Functionslist_schema_functionsList all functions in a schema

Index

OperationIDDescription
Create Indexcreate_indexCreate an index on a table
Drop Indexdrop_indexDrop an index
List Schema Indexeslist_schema_indexesList all indexes in a schema

Query

OperationIDDescription
Copy Data from Tablecopy_data_from_tableBulk export data from a table using COPY
Copy Data to Tablecopy_data_to_tableBulk import data to a table using COPY
Execute Batch Statementsexecute_batch_statementsExecute a statement with multiple parameter sets (batch operations)
Execute Sql Statementexecute_sql_statementExecute an INSERT, UPDATE, DELETE, or other non-SELECT statement
Explain Query Planexplain_query_planExplain a query’s execution plan
Run Query with Cursorrun_query_with_cursorExecute query with cursor for large result sets
Run Select Queryrun_select_queryExecute a SELECT query and return results as JSON

Role

OperationIDDescription
List Database Roleslist_database_rolesList all database roles
List Database Userslist_database_usersList all database users

Schema

OperationIDDescription
Create Schemacreate_schemaCreate a new schema
Drop Schemadrop_schemaDrop a schema
List Schemaslist_schemasList all schemas in the database

Sequence

OperationIDDescription
Get Sequence Current Valueget_sequence_current_valueGet the current value from a sequence (currval)
Get Sequence Next Valueget_sequence_next_valueGet the next value from a sequence (nextval)
List Schema Sequenceslist_schema_sequencesList all sequences in a schema
Set Sequence Valueset_sequence_valueSet the current value of a sequence (setval)

Table

OperationIDDescription
Analyze Table Statisticsanalyze_table_statisticsAnalyze a table to update statistics
Create Tablecreate_tableCreate a new table
Drop Tabledrop_tableDrop a table
Get Table Infoget_table_infoGet detailed information about a table including constraints and indexes
List Schema Tableslist_schema_tablesList all tables in a schema
List Table Columnslist_table_columnsGet column metadata for a table
List Table Constraintslist_table_constraintsList all constraints for a table
Truncate Tabletruncate_tableTruncate a table (remove all rows)
Vacuum Tablevacuum_tableVacuum a table to reclaim storage and update statistics

Transaction

OperationIDDescription
Begin Transactionbegin_transactionBegin a new transaction
Commit Transactioncommit_transactionCommit the current transaction
Rollback Transactionrollback_transactionRollback the current transaction

Trigger

OperationIDDescription
List Schema Triggerslist_schema_triggersList all triggers in a schema

View

OperationIDDescription
Create Viewcreate_viewCreate a view
Drop Viewdrop_viewDrop a view
List Schema Viewslist_schema_viewsList all views in a schema