Available on SaaS with FlowX.AI . This feature is live on managed (SaaS) deployments now. Self-hosted deployments receive it with the next LTS release.
Overview
PostgreSQL Database is a relational data source type that lets you connect FlowX workflows to PostgreSQL databases that your organization manages independently. You configure a connection, save named SQL queries against the schema, and call those queries from workflows.Connect to your PostgreSQL instance
Connect with host, database, schema, and credentials, with an optional SSL toggle
Schema-aware SQL editor
Monaco editor with SQL syntax highlighting, schema-aware autocomplete, and a side panel that lists tables, columns, primary keys, and foreign keys
Test before you ship
Run any saved query with sample parameters and inspect the response: rows for SELECT, affected-row information for INSERT / UPDATE / DELETE
Reusable in workflows
Reference PostgreSQL queries from the Database Operation node alongside other data sources
Prerequisites
- A PostgreSQL database accessible from your FlowX deployment
- A database user with the privileges your queries require (typically
SELECT,INSERT,UPDATE,DELETEon the target schema, plus read access to the system catalogs for schema discovery) - Network connectivity between the
nosql-db-runnerservice and the PostgreSQL instance - For SSL connections: appropriate certificates configured on the PostgreSQL instance and trusted by the FlowX deployment
Creating a PostgreSQL Database data source

Add a new data source
Click New Data Source to open the creation modal. In the Databases category, select the PostgreSQL Database tile, give the data source a name, and click Create.
Configure the connection
On the Settings tab, fill in the connection fields:
Each field accepts configuration parameters for environment-specific values.
| Field | Description |
|---|---|
| Host | PostgreSQL server hostname or IP |
| Port | PostgreSQL port (default 5432) |
| Database Name | The database to connect to |
| Schema Name | Optional. The schema to use for queries and discovery |
| SSL Enabled | Toggle SSL on or off for the connection |
| Username | Database username |
| Password | Database password |
Test the connection
Click Test Connection and Rescan to verify connectivity and refresh the schema cache.
The data source is created even if the connection test fails, so you can save partial configuration and resolve connectivity later. Return to the Settings tab and click Test Connection and Rescan once the issue is fixed.

Queries
Each PostgreSQL Database data source holds a list of named SQL queries. A query is a single parameterized SQL statement that you can call from a workflow.SQL editor
Open the Queries tab on the data source, then click New query to open the editor:
- Query: Monaco editor with SQL syntax highlighting and schema-aware autocomplete. Reference parameters in the query using
${paramName}interpolation, as noted by the hint above the editor. - Parameters: declare each parameter with a type, then in workflows assign values to them using node input paths. Supported types are
STRING,NUMBER,BOOLEAN,ENUM,DATE,CURRENCY, andOBJECT. - Schema awareness: discovered tables, columns, and primary/foreign keys feed the editor’s autocomplete so you can reference schema objects as you type.
The Monaco editor ships a full SQL language definition. Autocomplete suggestions cover SQL keywords and operators, table and column names parsed from the saved schema context, and
${paramName} interpolations resolved from the parameters panel. Hover and bracket matching match the rest of the FlowX code editors.Testing a query
Click Test to open the test modal:- Parameters: supply values for declared parameters.
- Query and tables: view the SQL and the resolved schema context.
- Response: for
SELECT, results render as both a table and JSON, along withtotalCount,responseTime(in milliseconds), andresponseSize. ForINSERT/UPDATE/DELETE, the response reflects the affected rows. Errors are returned with a database errorcodeandmessage(for example, a PostgreSQLSQLSTATEsuch as42P01: relation does not exist).
Response caching
Query responses can be cached from the Response Caching panel in the editor. Turn on Caching Enabled, then choose how long a cached response stays valid:- Expires after a fixed duration from each request.
- Expires at a specific time, on a recurrence (for example, daily).
Views, functions, and stored procedures
Beyond plainSELECT and DML statements, the schema browser discovers views, functions, and stored procedures as distinct entity types, so you can reference them the same way you reference tables.
| Entity | How to call it |
|---|---|
| Views | Query like any table: SELECT * FROM monthly_revenue WHERE month = ${m}. Non-updatable views are read-only. |
| Functions | Call in a SELECT: SELECT * FROM get_active_orders(${customer_id}) for set-returning functions, or SELECT calculate_vat(${amount}, ${country}) AS vat for scalar functions. |
| Stored procedures | Invoke with CALL: CALL create_invoice(${order_id}, ${issue_date}). |
Using in workflows
PostgreSQL queries are called from the existing Database Operation node in workflows.Add a Database Operation node
On the workflow canvas, drag a Database Operation node onto the workspace.
Select the data source and query
In the node configuration panel, pick the PostgreSQL data source. The query picker then lists only the queries saved on that data source.
Deployment
No new microservices are required. PostgreSQL Database queries run inside the existingnosql-db-runner service, which bundles the PostgreSQL JDBC driver. Each PostgreSQL data source uses its own HikariCP connection pool.
Configuration defaults
The following defaults apply to all relational database data sources and can be tuned via environment variables on thenosql-db-runner service:
| Environment Variable | Description | Default |
|---|---|---|
FLOWX_JDBC_CONNECTIONS_CACHE_MAX_ENTRIES | Maximum cached JDBC connection pools | 100 |
FLOWX_JDBC_CONNECTIONS_CACHE_TTL | Time-to-live for cached connection pools | 1d |
FLOWX_SQL_DEFAULTS_MAX_POOL_SIZE | Maximum HikariCP pool size per data source | 5 |
FLOWX_SQL_DEFAULTS_CONNECTION_TIMEOUT_SECONDS | JDBC connection timeout | 10 |
FLOWX_SQL_DEFAULTS_ROW_LIMIT | Default row cap on SELECT responses | 1000 |
FLOWX_SQL_DEFAULTS_QUERY_TIMEOUT_SECONDS | Query execution timeout | 30 |
Per-data-source advanced settings
Each PostgreSQL data source can override the global defaults from its Advanced settings panel, grouped into Pool size, Pool lifecycle, Liveness, and Performance. Fields left empty inherit the global value:| Setting | Description |
|---|---|
| Min Pool Size | Minimum number of connections kept open in the pool |
| Max Pool Size | Maximum number of connections in the pool |
| Connection Timeout (ms) | Maximum time to wait for a connection from the pool |
| Unused Timeout (ms) | Time an idle connection may sit in the pool before being retired |
| Aged Timeout (ms) | Maximum lifetime of a pooled connection |
| Keep Alive | Keep-alive probing for pooled connections |
| Maintenance Frequency (ms) | Interval between pool housekeeping runs. Editable only when Keep Alive is turned on |
| Validate Connection String | Query used to validate connections before use |
| Response Timeout (ms) | Per-query execution timeout for this data source |
nosql-db-runner service has network access to your PostgreSQL instance. If PostgreSQL is behind a firewall, configure the appropriate network rules.
Related resources
Oracle Database
Connect to Oracle databases with the same query and workflow experience
FlowX Database
Managed MongoDB data storage within FlowX
Unmanaged MongoDB
Connect to externally managed MongoDB instances
NoSQL DB Runner setup
Deployment configuration for the database runner service

