Error searching for documents: 42702 column reference "id" is ambiguous It could refer to either a PL/pgSQL variable or a table column

Describe the problem/error/question

I’m working to setup a LLM/RAG system and I receive the error: Error searching for documents: 42702 column reference “id” is ambiguous It could refer to either a PL/pgSQL variable or a table column.

This is after data is put into my documents table. I’m assuming it is because my two tables for documents and chat history both have an ID field …and I’m doing wrong.

I’m happy to grab any additional information to help you help me :stuck_out_tongue:

I’ve been working on this for a few days and I’m really stuck.

What is the error message (if any)?

42702 column reference “id” is ambiguous It could refer to either a PL/pgSQL variable or a table column.

Please share your workflow

Here is the workflow:

The config for local data:

The config for the Supabase Vector Store:

(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:
    I’m not sure, but it was just installed a week ago :frowning: I’m super new to this.

  • Database (default: SQLite):
    Postgres

  • n8n EXECUTIONS_PROCESS setting (default: own, main):
    ?

  • Running n8n via (Docker, npm, n8n cloud, desktop app):
    Local Install

  • Operating system:
    Windows 11

So, I did not find the answer to this, but removing and setting up my Supabase database all over again seems to have resolved the issue.

My guess is that I did something while building things that did something to the database.

…user error.

1 Like

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