AACFlow

PostgreSQL

Connect to PostgreSQL database

Usage Instructions

Integrate PostgreSQL into the workflow. Can query, insert, update, delete, and execute raw SQL.

Tools

postgresql_query

Input

ParameterTypeRequiredDescription
hoststringYesNo description
portnumberYesNo description
databasestringYesNo description
usernamestringYesNo description
passwordstringYesNo description
sslstringNoNo description
querystringYesNo description

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of rows returned from the query
rowCountnumberNumber of rows returned

postgresql_insert

Input

ParameterTypeRequiredDescription
hoststringYesNo description
portnumberYesNo description
databasestringYesNo description
usernamestringYesNo description
passwordstringYesNo description
sslstringNoNo description
tablestringYesNo description
dataobjectYesNo description

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayInserted data (if RETURNING clause used)
rowCountnumberNumber of rows inserted

postgresql_update

Input

ParameterTypeRequiredDescription
hoststringYesNo description
portnumberYesNo description
databasestringYesNo description
usernamestringYesNo description
passwordstringYesNo description
sslstringNoNo description
tablestringYesNo description
dataobjectYesNo description
wherestringYesNo description

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayUpdated data (if RETURNING clause used)
rowCountnumberNumber of rows updated

postgresql_delete

Input

ParameterTypeRequiredDescription
hoststringYesNo description
portnumberYesNo description
databasestringYesNo description
usernamestringYesNo description
passwordstringYesNo description
sslstringNoNo description
tablestringYesNo description
wherestringYesNo description

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayDeleted data (if RETURNING clause used)
rowCountnumberNumber of rows deleted

postgresql_execute

Input

ParameterTypeRequiredDescription
hoststringYesNo description
portnumberYesNo description
databasestringYesNo description
usernamestringYesNo description
passwordstringYesNo description
sslstringNoNo description
querystringYesNo description

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of rows returned from the query
rowCountnumberNumber of rows affected

postgresql_introspect

Introspect PostgreSQL database schema to retrieve table structures, columns, and relationships

Input

ParameterTypeRequiredDescription
hoststringYesNo description
portnumberYesNo description
databasestringYesNo description
usernamestringYesNo description
passwordstringYesNo description
sslstringNoNo description
schemastringNoNo description

Output

ParameterTypeDescription
messagestringOperation status message
tablesarrayArray of table schemas with columns, keys, and indexes
namestringTable name
schemastringSchema name (e.g., public)
columnsarrayTable columns
namestringColumn name
typestringData type (e.g., integer, varchar, timestamp)
nullablebooleanWhether the column allows NULL values
defaultstringDefault value expression
isPrimaryKeybooleanWhether the column is part of the primary key
isForeignKeybooleanWhether the column is a foreign key
referencesobjectForeign key reference information
tablestringReferenced table name
columnstringReferenced column name
primaryKeyarrayPrimary key column names
foreignKeysarrayForeign key constraints
columnstringLocal column name
referencesTablestringReferenced table name
referencesColumnstringReferenced column name
indexesarrayTable indexes
namestringIndex name
columnsarrayColumns included in the index
uniquebooleanWhether the index enforces uniqueness
schemasarrayList of available schemas in the database

On this page

Start building today
Trusted by over 100,000 builders.
The SaaS platform to build AI agents and run your agentic workforce.
Get started