{"id":43396,"library":"n8n-nodes-postgres-vector-store-tool","title":"n8n-nodes-postgres-vector-store-tool","description":"n8n community node for AI agent Postgres/pgvector vector store tool with vector search and custom SQL capabilities. Version 0.7.1 provides flexible querying beyond basic similarity search, supporting custom SQL mode for JOINs, filters, aggregation, row-level security, and hybrid search. Actively maintained on GitHub with TypeScript types included. Differentiates from built-in n8n Vector Store Tool by allowing full SQL control while still using embedding nodes.","status":"active","version":"0.7.1","language":"javascript","source_language":"en","source_url":"https://github.com/xtimor/n8n-nodes-pgvector-extended","tags":["javascript","n8n-community-node-package","n8n","pgvector","postgresql","vector-store","langchain","rls","row-level-security","typescript"],"install":[{"cmd":"npm install n8n-nodes-postgres-vector-store-tool","lang":"bash","label":"npm"},{"cmd":"yarn add n8n-nodes-postgres-vector-store-tool","lang":"bash","label":"yarn"},{"cmd":"pnpm add n8n-nodes-postgres-vector-store-tool","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for n8n node compatibility.","package":"n8n-workflow","optional":false}],"imports":[{"note":"ESM-only package; default export is the node class.","wrong":"const PostgresVectorStoreTool = require('n8n-nodes-postgres-vector-store-tool')","symbol":"default","correct":"import PostgresVectorStoreTool from 'n8n-nodes-postgres-vector-store-tool'"},{"note":"Named export identical to default; also exported for TypeScript.","wrong":"const { PostgresVectorStoreTool } = require('n8n-nodes-postgres-vector-store-tool')","symbol":"PostgresVectorStoreTool","correct":"import { PostgresVectorStoreTool } from 'n8n-nodes-postgres-vector-store-tool'"},{"note":"TypeScript type import only; not a runtime value.","wrong":"import { PostgresVectorStoreToolOptions } from 'n8n-nodes-postgres-vector-store-tool' (if using at runtime)","symbol":"type PostgresVectorStoreToolOptions","correct":"import type { PostgresVectorStoreToolOptions } from 'n8n-nodes-postgres-vector-store-tool'"}],"quickstart":{"code":"import PostgresVectorStoreTool from 'n8n-nodes-postgres-vector-store-tool';\n\n// Register the node with n8n\n// In your n8n workflow, the node appears as 'Postgres Vector Store Tool'\n// Configure connection: host, port, database, user, password (use credentials in n8n)\n// Choose mode:\n// Regular Retrieval: set tableName, vectorColumnName, contentColumnName, metadataColumnName, topK\n// Custom SQL: provide SQL query with $1 placeholder for embedding vector\n\n// Example custom SQL:\n// SELECT content, metadata, 1 - (embedding <=> $1) AS similarity\n// FROM documents\n// WHERE user_id = 'user123'\n// ORDER BY embedding <=> $1\n// LIMIT 10\n\n// The embedding is automatically passed from the connected embedding node\n// Output is JSON array in the 'text' field: [{\"text\": \"...\", \"metadata\": {...}}]","lang":"typescript","description":"Shows how to install and configure the Postgres Vector Store Tool in n8n, including both regular and custom SQL modes."},"warnings":[{"fix":"Use Chat Trigger and AI Agent to test; do not rely on Execute Step.","message":"The 'Execute Step' button does not work for AI Tool nodes in n8n. This is a platform limitation, not a bug.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure your SQL includes $1 exactly once for the embedding.","message":"Custom SQL mode requires the embedding vector as $1; misuse may cause runtime errors if the query doesn't include $1.","severity":"gotcha","affected_versions":"all"},{"fix":"Set vectorColumnName, contentColumnName, metadataColumnName in options to match your schema.","message":"Regular Retrieval mode defaults assume column names 'embedding', 'text', 'metadata'; if your table uses different names, configure Options.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin version or update carefully; check changelog before upgrading.","message":"No breaking changes reported yet; version <1.0 may introduce breaking changes.","severity":"deprecated","affected_versions":"<1.0"}],"env_vars":null,"search_vec":"'0.7.1':26 'activ':49 'agent':13 'aggreg':41 'ai':12 'allow':67 'basic':31 'beyond':30 'built':60 'built-in':59 'capabl':24 'communiti':9,79 'control':70 'custom':22,35 'differenti':57 'embed':74 'filter':40 'flexibl':28 'full':68 'github':52 'hybrid':47 'includ':56 'javascript':76 'join':39 'langchain':88 'level':44,92 'maintain':50 'mode':37 'n8n':2,8,62,78,82 'n8n-community-node-package':77 'n8n-nodes-postgres-vector-store-tool':1 'node':3,10,75,80 'packag':81 'pgvector':83 'postgr':4 'postgres/pgvector':14 'postgresql':84 'provid':27 'queri':29 'rls':89 'row':43,91 'row-level':42 'row-level-secur':90 'search':20,33,48 'secur':45,93 'similar':32 'sql':23,36,69 'still':72 'store':6,16,64,87 'support':34 'tool':7,17,65 'type':55 'typescript':54,94 'use':73 'vector':5,15,19,63,86 'vector-stor':85 'version':25","created_at":"2026-06-05T16:59:36.373474+00:00","updated_at":"2026-06-05T16:59:36.373474+00:00","problems":[{"fix":"Install via npm: npm install n8n-nodes-postgres-vector-store-tool. For manual install, use npm link or copy to ~/.n8n/custom.","cause":"Package not installed or n8n custom node path not configured.","error":"Error: Cannot find module 'n8n-nodes-postgres-vector-store-tool'"},{"fix":"Set the correct vector column name in node options (vectorColumnName).","cause":"Default column name 'embedding' does not match actual column name.","error":"Error: column \"embedding\" does not exist"},{"fix":"Check table name spelling and schema (e.g., public.documents).","cause":"Table name specified does not exist in database.","error":"Error: relation \"documents\" does not exist"},{"fix":"Ensure $1 is cast to vector type: embedding <=> $1::vector","cause":"Custom SQL uses <=> operator without casting the vector parameter.","error":"Error: operator does not exist: text <=> unknown"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/xtimor/n8n-nodes-pgvector-extended","github":"https://github.com/xtimor/n8n-nodes-pgvector-extended","docs":null,"changelog":null,"pypi":null,"npm":"n8n-nodes-postgres-vector-store-tool","openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}