Registry /
ai-ml / n8n-nodes-postgres-vector-store-tool
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ import PostgresVectorStoreTool from 'n8n-nodes-postgres-vector-store-tool'
✗ const PostgresVectorStoreTool = require('n8n-nodes-postgres-vector-store-tool')
ESM-only package; default export is the node class.
PostgresVectorStoreTool
✓ import { PostgresVectorStoreTool } from 'n8n-nodes-postgres-vector-store-tool'
✗ const { PostgresVectorStoreTool } = require('n8n-nodes-postgres-vector-store-tool')
Named export identical to default; also exported for TypeScript.
type PostgresVectorStoreToolOptions
✓ import type { PostgresVectorStoreToolOptions } from 'n8n-nodes-postgres-vector-store-tool'
✗ import { PostgresVectorStoreToolOptions } from 'n8n-nodes-postgres-vector-store-tool' (if using at runtime)
TypeScript type import only; not a runtime value.
Shows how to install and configure the Postgres Vector Store Tool in n8n, including both regular and custom SQL modes.
import PostgresVectorStoreTool from 'n8n-nodes-postgres-vector-store-tool';
// Register the node with n8n
// In your n8n workflow, the node appears as 'Postgres Vector Store Tool'
// Configure connection: host, port, database, user, password (use credentials in n8n)
// Choose mode:
// Regular Retrieval: set tableName, vectorColumnName, contentColumnName, metadataColumnName, topK
// Custom SQL: provide SQL query with $1 placeholder for embedding vector
// Example custom SQL:
// SELECT content, metadata, 1 - (embedding <=> $1) AS similarity
// FROM documents
// WHERE user_id = 'user123'
// ORDER BY embedding <=> $1
// LIMIT 10
// The embedding is automatically passed from the connected embedding node
// Output is JSON array in the 'text' field: [{"text": "...", "metadata": {...}}]
Errors
Common errors & fixes
Error: Cannot find module 'n8n-nodes-postgres-vector-store-tool'
Package not installed or n8n custom node path not configured.
fixInstall via npm: npm install n8n-nodes-postgres-vector-store-tool. For manual install, use npm link or copy to ~/.n8n/custom.
Error: column "embedding" does not exist
Default column name 'embedding' does not match actual column name.
fixSet the correct vector column name in node options (vectorColumnName).
Error: relation "documents" does not exist
Table name specified does not exist in database.
fixCheck table name spelling and schema (e.g., public.documents).
Error: operator does not exist: text <=> unknown
Custom SQL uses <=> operator without casting the vector parameter.
fixEnsure $1 is cast to vector type: embedding <=> $1::vector
Audit
Dependencies
n8n-workflowrequiredPeer dependency required for n8n node compatibility.