RAG with Postgres

Hii guys…
I need to solve a problem about inserting into a database.
I loaded a RAG model with supabase.

I’m trying to switch the supabase node to postgres node, but I don’t know how to execute a function on the postgres node.
Maybe you can show me a way.

Supabase
Delete
metadata->>file_id=like.{{ $json.file_id }}

Insert
match_documents

Read
match_documents

Postgres
Delete
DELETE FROM documents
WHERE metadata->>‘file_id’ ILIKE ‘%’ || ‘{{ $json.file_id }}’ || ‘%’;

Insert
I left the “metadata” function blank

Read
I don’t know how to indicate the “match” query

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: