# Postgres insert or update not working when id is 0

**URL:** <https://community.n8n.io/t/postgres-insert-or-update-not-working-when-id-is-0/35792>\
**Category:** Questions\
**Created:** [January 24, 2024, 11:18am UTC](https://community.n8n.io/t/postgres-insert-or-update-not-working-when-id-is-0/35792 "2024-01-24T11:18:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valdri](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@Valdri](https://community.n8n.io/u/Valdri)\
**Post date:** [January 24, 2024, 11:18am UTC](https://community.n8n.io/t/postgres-insert-or-update-not-working-when-id-is-0/35792/1 "2024-01-24T11:18:46Z")

</div>

I have this data:

```auto
[
  {
    "id": 0,
    "name": "Osobiście/tel.",
    "group": "personal"
  }
]

```

I can use “insert” or “update” action in postgress, but when I try to use “insert or update” action, I get an error: Column to match on not found in input item.

## Information on your n8n setup

- \*\*n8n version:\*\*1.22.6

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [January 24, 2024, 11:18am UTC](https://community.n8n.io/t/postgres-insert-or-update-not-working-when-id-is-0/35792/2 "2024-01-24T11:18:47Z")

</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:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [January 25, 2024, 6:23pm UTC](https://community.n8n.io/t/postgres-insert-or-update-not-working-when-id-is-0/35792/3 "2024-01-25T18:23:12Z")

</div>

Hey @Valdri,

That is very odd, I will get a ticket created for it shortly so we can fix it. How often do you have an id of 0, This is the first time I have heard of someone using 0 as an id value so it would be handy to get an idea of how much of an issue this might be.

---

<div class="post-metadata">

**Author:** ![Valdri](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@Valdri](https://community.n8n.io/u/Valdri)\
**Post date:** [January 25, 2024, 7:15pm UTC](https://community.n8n.io/t/postgres-insert-or-update-not-working-when-id-is-0/35792/4 "2024-01-25T19:15:56Z")

</div>

Hi @Jon,  
baselinker most popular ERP in Poland, uses 0 as identifier in api getOrderSources request.  
To fix this issue, I use a custom SQL query

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [April 24, 2024, 7:16pm UTC](https://community.n8n.io/t/postgres-insert-or-update-not-working-when-id-is-0/35792/5 "2024-04-24T19:16:06Z")

</div>

Closed on April 24, 2024, 7:16pm UTC

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