# PostgreSQL - Workflow node | Docs - nodulz

Source: https://nodulz.com/docs/nodes/postgres

Language: en

Query, select, and manage PostgreSQL schemas, tables, and rows

## Usage and specifics

Choose a credential or PostgreSQL service through connectionSource. Guided modes manage schemas, tables and rows; SQL mode executes the supplied query. DELETE, DROP and cascade can remove data.

Technical type : `postgres`. Runtime : `nodulz`.

## Credentials and prerequisites

- [Create and configure the credential : postgres](/docs/credentials/postgres)

Create credentials in your nodulz instance’s Credentials area, then select them on the node. Availability depends on ownership and sharing. See the [credentials guide](/docs/credentials) for access and rotation.

## Parameters

Names below are technical keys. Defaults are not a ready-to-run configuration: complete fields required by your operation. Paths containing [] describe list items; some fields depend on the selected mode.

| Parameter | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `credentialId` | `string` | - | - |
| `serviceInstanceId` | `string` | - | - |
| `connectionSource` | `enum` | `"credential"` | `credential`, `service` |
| `operation` | `enum` | `"query"` | `query`, `select`, `insert`, `update`, `delete`, `create_schema`, `drop_schema`, `create_table`, `drop_table`, `alter_table` |
| `query` | `string` | `"SELECT 1 AS ok"` | - |
| `rawExpressions` | `boolean` | `false` | - |
| `schema` | `string` | `""` | - |
| `table` | `string` | `""` | - |
| `columns` | `string` | `"*"` | - |
| `data` | `string` | `""` | - |
| `match` | `string` | `""` | - |
| `orderBy` | `string` | `""` | - |
| `limit` | `string` | `""` | - |
| `ddl` | `string` | `""` | - |
| `ifNotExists` | `boolean` | `false` | - |
| `ifExists` | `boolean` | `false` | - |
| `cascade` | `boolean` | `false` | - |
| `returning` | `string` | `""` | - |

## Configuration help

| Setting | Purpose and guidance |
| --- | --- |
| `connectionSource`<br>Connection source | Use a manual credential or a service deployed in the Services space. |
| `serviceInstanceId`<br>Service instance | Only Available services matching the app binding are listed. |
| `credentialId`<br>Database credential | Connection settings are stored on the Credentials page. |
| `operation`<br>Operation | SQL operation type to run on PostgreSQL. |
| `query`<br>SQL query | Any SQL statement (SELECT, INSERT, DDL…). Expressions are sent as parameters: do not wrap them in quotes. |
| `rawExpressions`<br>Insert expressions as-is (unsafe) | Only for dynamic table or column names, with trusted values. |
| `schema`<br>Schema | PostgreSQL schema name (letters, numbers, underscore). |
| `table`<br>Table | Use double curly braces for dynamic values, e.g. {{ nodes.http1.body.id }} |
| `columns`<br>Columns | Comma-separated column list or * for all columns. |
| `data`<br>Data (JSON object) | JSON object: keys are column names, values are strings (workflow expressions allowed in each value). |
| `orderBy`<br>ORDER BY | Sort order, e.g. created_at DESC. Identifiers only. |
| `limit`<br>LIMIT | Maximum number of rows to return (positive integer). |
| `returning`<br>RETURNING (optional) | Columns to return after insert/update, e.g. * or id, created_at. |
| `ddl`<br>Definition | For create table: column definitions in parentheses. For alter: clause starting with ADD, DROP, ALTER, or RENAME. |
| `ifNotExists`<br>IF NOT EXISTS | Adds IF NOT EXISTS to the DDL statement. |
| `ifExists`<br>IF EXISTS | Adds IF EXISTS to the DDL statement. |
| `cascade`<br>CASCADE | Propagates deletion to dependent objects (DROP CASCADE). |

## Initial configuration

Initial catalog configuration example, to adapt before running. Keep secrets in credentials.

```json
{
  "operation": "query",
  "query": "SELECT 1 AS ok",
  "schema": "",
  "table": "",
  "columns": "*",
  "data": "",
  "match": "",
  "orderBy": "",
  "limit": "",
  "ddl": "",
  "ifNotExists": false,
  "ifExists": false,
  "cascade": false,
  "returning": ""
}
```

## Verification

Test with representative data. Check node output in the inspector and logs, then use editor mapping for downstream fields. A trigger test with a simulated payload does not validate external service delivery.

See also : [Expressions and data](/docs/expressions), [Executions](/docs/executions), [Node catalog](/docs/nodes).

## Explore further

- [Features - nodulz](https://nodulz.com/product/overview)
- [Node catalog - nodulz](https://nodulz.com/product/catalog)
- [MCP server - nodulz](https://nodulz.com/product/mcp)
- [Pricing - nodulz](https://nodulz.com/pricing)
- [Use cases and workflow automation - nodulz](https://nodulz.com/use-cases)
- [Choose what your workflows can do. - nodulz](https://nodulz.com/compare)
- [Documentation - nodulz](https://nodulz.com/docs)
