Skip to main content

PostgreSQL Node

What it does

Executes PostgreSQL queries or statements using a PostgreSQL credential and returns rows/metadata for downstream nodes.

Inputs/config

  • PostgreSQL credential reference.
  • SQL statement and parameters.
  • Optional transaction or timeout settings.

Outputs/branches

  • Uses matched_output.
  • success on query success.
  • error on SQL, connectivity, or auth failure.

Example usage snippet

{
"id": "n_pg",
"type": "postgres_node",
"config": {
"query": "select * from customers where id = $1",
"params": ["{{input.customerId}}"]
}
}

Common pitfalls

  • Building SQL with string concatenation instead of parameters.
  • Forgetting to set statement timeout for long queries.
  • Assuming write statements return result rows.