# Error while executing Postgres node (ERROR: operator does not exist: uuid = text)

**URL:** <https://community.n8n.io/t/error-while-executing-postgres-node-error-operator-does-not-exist-uuid-text/8728>\
**Category:** Questions\
**Tags:** node\
**Created:** [October 28, 2021, 3:10pm UTC](https://community.n8n.io/t/error-while-executing-postgres-node-error-operator-does-not-exist-uuid-text/8728 "2021-10-28T15:10:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roket](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/roket/32/475_2.png) [@Roket](https://community.n8n.io/u/Roket)\
**Post date:** [October 28, 2021, 3:10pm UTC](https://community.n8n.io/t/error-while-executing-postgres-node-error-operator-does-not-exist-uuid-text/8728/1 "2021-10-28T15:10:45Z")

</div>

Hello everyone!  
Faced the following problem in Postgres node.

**This query works:**

```auto
SELECT wt.uuid AS wt_uuid, ct.uuid AS ct_uuid, ct.text AS ct_text, ctm.uuid AS ctm_uuid, ctm.article AS ctm_article
FROM public."work_task" wt
LEFT JOIN public."complete_task_miratext" ctm ON ctm.work_task = '{{$json["uuid"]}}'
LEFT JOIN public."complete_task" ct ON ct.work_task = '{{$json["uuid"]}}'
WHERE wt.uuid = '{{$json["uuid"]}}';

```

**But such a request does not work:**

```auto
SELECT wt.uuid AS wt_uuid, mftm.uuid AS mftm_uuid, mftm.order AS mftm_order, mfp.name AS mfp_name, ct.uuid AS ct_uuid, ct.text AS ct_text, ctm.uuid AS ctm_uuid, ctm.article AS ctm_article
FROM public."work_task" wt
LEFT JOIN public."complete_task_miratext" ctm ON ctm.work_task = wt.uuid
LEFT JOIN public."complete_task" ct ON ct.work_task = wt.uuid
LEFT JOIN public."meta_field_in_task_master" mftm ON mftm.uuid = wt.meta_field_in_task_master
LEFT JOIN public."meta_field_in_project" mfp ON mfp.uuid = mftm.meta_field_in_project
LEFT JOIN public."meta_field" mf ON mf.uuid = mfp.meta_field
LEFT JOIN public."meta_field_type" mft ON mft.uuid = mf.type
LEFT JOIN public."posting_way" pw ON pw.uuid = mft.posting_way
WHERE wt.uuid = '{{$json["uuid"]}}';

```

Throws the following error: “ERROR: operator does not exist: uuid = text”

 ![35gwrbgefq](https://europe1.discourse-cdn.com/n8n/original/2X/a/a450f09f26c75495d17a14b3fb5bc2a854cd3be1.png)

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [October 29, 2021, 7:29am UTC](https://community.n8n.io/t/error-while-executing-postgres-node-error-operator-does-not-exist-uuid-text/8728/3 "2021-10-29T07:29:29Z")

</div>

Hi @Roket, this message comes from PostgreSQL rather than n8n. It seems like PostgreSQL is expecting a uuid datatype for your second query rather than a text. Without knowing the specifics of your databases or the value you are passing on it’ll be hard to tell why that’s happening for only one of your queries.

You could try explicitly casting the field when querying (e.g. `... WHERE wt.uuid::text = '...'`) as a first step.

---

<div class="post-metadata">

**Author:** ![Roket](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/roket/32/475_2.png) [@Roket](https://community.n8n.io/u/Roket)\
**Post date:** [October 29, 2021, 9:16am UTC](https://community.n8n.io/t/error-while-executing-postgres-node-error-operator-does-not-exist-uuid-text/8728/4 "2021-10-29T09:16:23Z")

</div>

@MutedJam, Yes, thanks for the answer, you were right! There is one table where the “uuid” column was of type uuid, I changed the type to text and it worked.
