# Bug - Postgres v2.5 query parameters comma issue

**URL:** <https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080>\
**Category:** Questions\
**Tags:** node, postgres\
**Created:** [September 1, 2024, 1:56pm UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080 "2024-09-01T13:56:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Lourd1](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kevin_lourd1/32/43794_2.png) [@Kevin\_Lourd1](https://community.n8n.io/u/Kevin_Lourd1)\
**Post date:** [September 1, 2024, 1:56pm UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/1 "2024-09-01T13:56:08Z")

</div>

## Describe the problem/error/question

When having a:

- Postgres Node v2.5
- Calling a query, with query parameters  
Then if one of the input has commas it will split the input in several parts (even with single quote around, and with the toggle option ON)

Ex: ‘MON, 21, 2023’ as $1, will be split into $1:‘MON’, $2:’ 21’, $3: ’ 2023’

## What is the error message (if any)?

## Please share your workflow

```auto
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

```

## Share the output returned by the last node

## Information on your n8n setup

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/26906_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [September 1, 2024, 1:56pm UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/2 "2024-09-01T13:56:09Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![Kevin\_Lourd1](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kevin_lourd1/32/43794_2.png) [@Kevin\_Lourd1](https://community.n8n.io/u/Kevin_Lourd1)\
**Post date:** [September 3, 2024, 12:45pm UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/3 "2024-09-03T12:45:55Z")

</div>

- **n8n version:** n8n@1.56.2
- **Database (default: SQLite):** default
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** default
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** cloud
- **Operating system:** mac

---

<div class="post-metadata">

**Author:** ![Kevin\_Lourd1](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kevin_lourd1/32/43794_2.png) [@Kevin\_Lourd1](https://community.n8n.io/u/Kevin_Lourd1)\
**Post date:** [September 3, 2024, 12:47pm UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/4 "2024-09-03T12:47:46Z")

</div>

(_Duplicate I guess of this bug report: [Postgres Query Parameters ... bug?](http://community.n8n.io/t/postgres-query-parameters-bug/51419)_)

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [September 3, 2024, 2:21pm UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/5 "2024-09-03T14:21:30Z")

</div>

Hi @Kevin_Lourd1

Thanks for reporting this!  
We will have a look internally and post an update here 🙏

---

<div class="post-metadata">

**Author:** ![jamescv](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jamescv/32/29604_2.png) [@jamescv](https://community.n8n.io/u/jamescv)\
**Post date:** [September 26, 2024, 10:30pm UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/7 "2024-09-26T22:30:57Z")

</div>

It seems the Postgres 2.5 node doesn’t recognise Boolean parameters properly either. Once again, 2.4 offers a temporary workaround but I obviously that can be a bit of hassle.

---

<div class="post-metadata">

**Author:** ![colvint](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/colvint/32/48373_2.png) [@colvint](https://community.n8n.io/u/colvint)\
**Post date:** [November 10, 2024, 1:02pm UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/8 "2024-11-10T13:02:02Z")

</div>

On Postgres node version 2.5 (Latest):

Claude Sonnet 3.5 with the assist 😉

Working pattern (when strings might contain commas):

A query:

```sql
INSERT INTO
  local.statuses (
    user_id,
    progress,
    summary,
    reported_at,
    updated_at,
  )
SELECT 
  u.id,
  $2::text[], -- <---- this
  $3,
  NOW(),
  NOW()
FROM local.users u 
WHERE u.some_id = $1
RETURNING *;

```

Query params using a Javascript array to order params and curly braces to feed the $2::text slot in the Postgres query:

```javascript
{{ [
  $('some_previous_node').first().json.user.id,
  '{' + $json.output.progress.join(',') + '}', // <---- this
  $json.output.summary
] }}

```

---

<div class="post-metadata">

**Author:** ![Byron\_Hsu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/byron_hsu/32/35632_2.png) [@Byron\_Hsu](https://community.n8n.io/u/Byron_Hsu)\
**Post date:** [November 11, 2024, 1:52am UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/9 "2024-11-11T01:52:23Z")

</div>

As i mentioned on the other linked post, I’m getting this bug as well on 2.5. Rolling back to 2.4 fixed it.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/36532_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [February 9, 2025, 1:52am UTC](https://community.n8n.io/t/bug-postgres-v2-5-query-parameters-comma-issue/53080/10 "2025-02-09T01:52:28Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
