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
| Operation | ID | Description |
|---|---|---|
| List Databases | list_databases | List all databases in the PostgreSQL server |
Extension
| Operation | ID | Description |
|---|---|---|
| Install Extension | install_extension | Create/install an extension |
| List Extensions | list_extensions | List all installed extensions |
Function
| Operation | ID | Description |
|---|---|---|
| Call Database Function | call_database_function | Call a PostgreSQL function |
| List Schema Functions | list_schema_functions | List all functions in a schema |
Index
| Operation | ID | Description |
|---|---|---|
| Create Index | create_index | Create an index on a table |
| Drop Index | drop_index | Drop an index |
| List Schema Indexes | list_schema_indexes | List all indexes in a schema |
Query
| Operation | ID | Description |
|---|---|---|
| Copy Data from Table | copy_data_from_table | Bulk export data from a table using COPY |
| Copy Data to Table | copy_data_to_table | Bulk import data to a table using COPY |
| Execute Batch Statements | execute_batch_statements | Execute a statement with multiple parameter sets (batch operations) |
| Execute Sql Statement | execute_sql_statement | Execute an INSERT, UPDATE, DELETE, or other non-SELECT statement |
| Explain Query Plan | explain_query_plan | Explain a query’s execution plan |
| Run Query with Cursor | run_query_with_cursor | Execute query with cursor for large result sets |
| Run Select Query | run_select_query | Execute a SELECT query and return results as JSON |
Role
| Operation | ID | Description |
|---|---|---|
| List Database Roles | list_database_roles | List all database roles |
| List Database Users | list_database_users | List all database users |
Schema
| Operation | ID | Description |
|---|---|---|
| Create Schema | create_schema | Create a new schema |
| Drop Schema | drop_schema | Drop a schema |
| List Schemas | list_schemas | List all schemas in the database |
Sequence
| Operation | ID | Description |
|---|---|---|
| Get Sequence Current Value | get_sequence_current_value | Get the current value from a sequence (currval) |
| Get Sequence Next Value | get_sequence_next_value | Get the next value from a sequence (nextval) |
| List Schema Sequences | list_schema_sequences | List all sequences in a schema |
| Set Sequence Value | set_sequence_value | Set the current value of a sequence (setval) |
Table
| Operation | ID | Description |
|---|---|---|
| Analyze Table Statistics | analyze_table_statistics | Analyze a table to update statistics |
| Create Table | create_table | Create a new table |
| Drop Table | drop_table | Drop a table |
| Get Table Info | get_table_info | Get detailed information about a table including constraints and indexes |
| List Schema Tables | list_schema_tables | List all tables in a schema |
| List Table Columns | list_table_columns | Get column metadata for a table |
| List Table Constraints | list_table_constraints | List all constraints for a table |
| Truncate Table | truncate_table | Truncate a table (remove all rows) |
| Vacuum Table | vacuum_table | Vacuum a table to reclaim storage and update statistics |
Transaction
| Operation | ID | Description |
|---|---|---|
| Begin Transaction | begin_transaction | Begin a new transaction |
| Commit Transaction | commit_transaction | Commit the current transaction |
| Rollback Transaction | rollback_transaction | Rollback the current transaction |
Trigger
| Operation | ID | Description |
|---|---|---|
| List Schema Triggers | list_schema_triggers | List all triggers in a schema |
View
| Operation | ID | Description |
|---|---|---|
| Create View | create_view | Create a view |
| Drop View | drop_view | Drop a view |
| List Schema Views | list_schema_views | List all views in a schema |