Skip to main content
The PostgresResourceClient allows you to execute SQL queries against your PostgreSQL database connectors.
Managed PostgreSQL connectors provisioned through Major use this same client. See Managed Connectors for details on provisioning. You can click Browse tables and data to inspect managed connectors — browse tables, view rows with pagination, and view schema details.

Usage

Inputs

The invoke method accepts the following arguments:
string
required
The SQL query string to execute. Use $1, $2, etc., for parameterized queries.
(string | number | boolean | null)[]
An array of values for the parameterized query.
string
required
A unique identifier for this operation, used for tracing and logging. Must match [a-zA-Z0-9][a-zA-Z0-9._:-]*.
number
Optional timeout in milliseconds for the query execution.

Outputs

On success (ok: true), the result object contains:
"database"
Discriminator for the response type.
Record<string, unknown>[]
An array of objects representing the rows returned by the query.
number
The number of rows affected by the query (e.g., for INSERT, UPDATE, DELETE).