Create Table
Create a new table in the PostgreSQL database with specified columns and constraints.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_CREATE_TABLE])
Insert Row
Insert a new row of data into a specified table in the PostgreSQL database.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_INSERT_ROW])
Update Row
Update an existing row in a specified table based on given conditions.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_UPDATE_ROW])
Delete Row
Delete a row or multiple rows from a specified table based on given conditions.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_DELETE_ROW])
Execute Query
Execute a custom SQL query on the PostgreSQL database and return the results.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_EXECUTE_QUERY])
Create Index
Create an index on one or more columns of a specified table to improve query performance.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_CREATE_INDEX])
Add Column
Add a new column to an existing table in the PostgreSQL database.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_ADD_COLUMN])
Drop Table
Remove a specified table and all its data from the PostgreSQL database.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_DROP_TABLE])
Create View
Create a view based on a SELECT statement to provide a virtual table.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_CREATE_VIEW])
Backup Database
Create a backup of the entire PostgreSQL database or specific tables.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_BACKUP_DATABASE])
Restore Database
Restore a PostgreSQL database from a previously created backup.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_RESTORE_DATABASE])
Create User
Create a new user account in the PostgreSQL database with specified privileges.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_CREATE_USER])
Grant Permissions
Grant specific permissions to a user or role for database objects.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_GRANT_PERMISSIONS])
Revoke Permissions
Revoke previously granted permissions from a user or role for database objects.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_REVOKE_PERMISSIONS])
Create Function
Create a new function in the PostgreSQL database using PL/pgSQL or other supported languages.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_CREATE_FUNCTION])
New Row Inserted
Triggered when a new row is inserted into a specified table.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_NEW_ROW_INSERTED])
Row Updated
Triggered when a row is updated in a specified table.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_ROW_UPDATED])
Row Deleted
Triggered when a row is deleted from a specified table.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_ROW_DELETED])
Table Created
Triggered when a new table is created in the database.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_TABLE_CREATED])
Table Dropped
Triggered when a table is dropped from the database.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_TABLE_DROPPED])
Database Backup Completed
Triggered when a database backup operation is successfully completed.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_BACKUP_COMPLETED])
Query Execution Completed
Triggered when a specified query or stored procedure execution is completed.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_QUERY_COMPLETED])
User Login
Triggered when a user successfully logs into the database.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_USER_LOGIN])
User Logout
Triggered when a user logs out of the database.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_USER_LOGOUT])
Database Size Threshold Reached
Triggered when the database size reaches a specified threshold.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_SIZE_THRESHOLD])
Index Created
Triggered when a new index is created on a table.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_INDEX_CREATED])
Scheduled Maintenance Start
Triggered when a scheduled maintenance operation begins.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_MAINTENANCE_START])
Scheduled Maintenance End
Triggered when a scheduled maintenance operation completes.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_MAINTENANCE_END])
Connection Pool Exhausted
Triggered when the database connection pool reaches its maximum capacity.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_CONNECTION_POOL_EXHAUSTED])
Slow Query Detected
Triggered when a query exceeds a specified execution time threshold.
from composio_openai import ComposioToolSet, Action
tool_set = ComposioToolSet()
tools = tool_set.get_tools(actions=[Action.POSTGRESQL_SLOW_QUERY_DETECTED])