Neon is a serverless Postgres platform with built-in pgvector support. Gateco treats Neon as a Tier 1 connector — supporting full document ingestion, retroactive registration, and RAG access control. This guide covers the complete setup from a fresh Neon project to your first identity-aware retrieval, adding vector database RBAC on top of your existing pgvector tables.
Step 1 — Get your Neon connection string
- Log in to console.neon.tech and open your project.
- In the Connection Details panel, select your database and role.
- Copy the connection string. It looks like:
postgresql://user:password@ep-cool-term-123456.us-east-2.aws.neon.tech/dbname?sslmode=requireUse the direct connection string, not the pooled one. Look for the string under "Direct connection" in the Connection Details panel.
Step 2 — Enable the pgvector extension
Connect to your Neon database with any SQL client and run:
CREATE EXTENSION IF NOT EXISTS vector;Verify it is installed:
SELECT * FROM pg_extension WHERE extname = 'vector';Step 3 — Create a dedicated database user (recommended)
Using a dedicated user makes it easy to audit Gateco access and rotate credentials independently.
-- Create the Gateco user
CREATE USER gateco WITH PASSWORD 'your-strong-password';
-- For ingestion (write access to your vector table)
GRANT INSERT, SELECT, UPDATE, DELETE ON your_vector_table TO gateco;
GRANT USAGE, SELECT ON SEQUENCE your_vector_table_id_seq TO gateco;
-- pgvector catalog access (required for metadata introspection)
GRANT SELECT ON pg_extension TO gateco;Step 4 — Add the connector in Gateco
- In the Gateco dashboard, navigate to Connectors → Add connector → Neon.
- Paste your connection string from Step 1.
- Click Test connection. Gateco will introspect your schema and show available tables.
- Click Save.
Step 5 — Configure search settings
After saving the connector, configure the search settings to point Gateco at your vector table:
- In Connectors, click your Neon connector → Search config.
- Set the Vector table name (e.g. embeddings).
- Set the Embedding column (e.g. embedding).
- Set the Content column if your table stores the original text (e.g. content).
- Save the search config.
Search configuration reference
| Field | Example | Description |
|---|---|---|
table_name | embeddings | Name of the table containing vector embeddings |
embedding_column | embedding | Column with type vector(n) |
content_column | content | Column with the original document text (optional) |
id_column | id | Primary key column (default: id) |
metadata_columns | ["doc_id","category"] | Additional columns to include in policy metadata |
Ingest your first document
from gateco_sdk import GatecoClient
client = GatecoClient(api_key="gck_live_...")
# Ingest a document
result = client.ingest.document(
connector_id="your-connector-id",
resource_id="doc-001",
content="This document contains confidential HR information.",
embedding=[0.1, 0.2, ...], # your 1536-dim embedding
metadata={"classification": "confidential", "department": "hr"},
)Troubleshooting
| Error | Cause | Fix |
|---|---|---|
SSL connection required | Missing sslmode=require | Add ?sslmode=require to the end of your connection string |
vector type not found | pgvector extension not enabled | Run CREATE EXTENSION IF NOT EXISTS vector in your database |
permission denied for table | User lacks SELECT permission | Run GRANT SELECT ON your_table TO gateco_user |