Skip to content

Postgres Query Parameters break when a text parameter includes a comma #16354

Description

@DimaUndSo

Bug Description

I refer here to the same issue that was already "Closed as not planned":
https://github.com/n8n-io/n8n/issues/14955

Closing this is ridiculous, please fix it, as you can't use the Postgres node properly right now with this error.
It needs weird workarounds, editing the text to remove the commas.. this is not the way it should be.

To Reproduce

  1. Configure a Postgres node for the Execute Query operation.
  2. Set the Query to use multiple parameters, e.g.: INSERT INTO your_table (text_col, timestamp_col) VALUES ($1, $2);
  3. In the node "Options", add the "Query Parameters" field.
  4. Enter an expression that evaluates to a comma-separated string where the first value contains a comma, e.g.:
  5. {{ $json.textWithCommas }},{{ $json.ISOTimeStamp }}
  6. Execute the node.

Expected behavior

The node should correctly parse the comma-separated string provided in the "Query Parameters" field. It should assign the full string "Text data, with a comma" to $1 and the string "2025-01-01T12:00:00Z" to $2, allowing the parameterised query to execute successfully against the database.

Operating System

Ubuntu Linux

n8n Version

1.97.1

Node.js Version

v20.19.0

Database

PostgreSQL

Execution mode

main (default)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions