PostgreSQL
API actions for the PostgreSQL integration.
PostgreSQL
Query PostgreSQL databases with table exploration, CRUD operations, and custom SQL.
Delete rows
Delete rows from a PostgreSQL table that match filters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table containing the rows to delete. |
match | object | Yes | Key/value pairs to match rows (equality filters). |
schema | string | No | Schema containing the table (defaults to public). |
Response
{
"rows": [
{}
]
}Insert a row
Insert a record into a PostgreSQL table and return it.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table to insert into. |
record | object | Yes | JSON object representing the row to insert. |
schema | string | No | Schema containing the table (defaults to public). |
Response
{
"record": {}
}List columns for a table
Fetch column names and data types for a PostgreSQL table.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table name to inspect. |
schema | string | No | Schema containing the table (defaults to public). |
Response
{
"columns": [
{}
]
}List tables in a schema
Retrieve the tables available in a PostgreSQL schema.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
schema | string | No | Schema name to query (defaults to public). |
Response
{
"tables": [
{}
]
}Run custom SQL
Execute a custom SQL query with optional parameters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | SQL query to execute. |
parameters | array | No | Optional ordered parameters for the SQL query. |
Response
{
"result": [
{}
]
}Select rows
Select rows from a PostgreSQL table with optional filters and limits.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table name to query. |
columns | array | No | Optional list of column names to return. |
filters | object | No | Optional equality filters as key/value pairs. |
limit | number | No | Maximum number of rows to return. |
schema | string | No | Schema containing the table (defaults to public). |
Response
{
"rows": [
{}
]
}Update rows
Update rows in a PostgreSQL table that match filters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table containing the rows to update. |
match | object | Yes | Key/value pairs to match rows (equality filters). |
updates | object | Yes | Fields to update on matching rows. |
schema | string | No | Schema containing the table (defaults to public). |
Response
{
"rows": [
{}
]
}