Egress PostgreSQL¶
Responsibility¶
Parameterized SQL capability provider for workflow service_call steps.
Capabilities:
egress.postgres.query— read (SELECT/WITH/ …) →{ ok, row_count, rows }egress.postgres.execute— DML/DDL (INSERT/UPDATE/ …) →{ ok, row_count }postgres.connection— connection typepostgres
Requests use parameterized SQL only:
{
"sql": "SELECT item_json FROM erpnext_item_snapshot WHERE item_id = %s",
"params": ["100002"]
}
Multiple statements in one call are rejected. Connection fields (host, port,
database, username, password, sslmode) are merged from the workflow
connection document.
Connection Model¶
name: postgres
type: postgres
host: postgres
port: 5432
database: meshflows
username: meshflows
password: $secret:postgres-password
sslmode: prefer
Reference: flows/connections/postgres.yaml.
Architecture¶
Capability provider (see Deploy integration contract):
- Registers with
capability-registryat startup aspostgres.service - Distinct from the platform
postgresDeployment (orchestrator ledger); this service isegress-postgresand talks to whatever DSN the connection specifies
Example workflow step¶
- id: load_snapshot
type: service_call
capability_name: egress.postgres.query
capability_version: "^1.0"
path: /query
connection: postgres
payload: |
{
"sql": "SELECT item_json FROM erpnext_item_snapshot WHERE item_id = %s",
"params": ["{item_id}"]
}
values:
item_id: "request:xml:/Message/id"