Postgres Init Script (pgvector) (init.sql)

MIRIX · database, Database / ORM, postgresql, pgvector, sql, extensions, initialization

SQL initialization script enabling pgvector, uuid-ossp, and pg_trgm extensions on first database startup; reuse for setting up Postgres databases needing vector search and fuzzy text matching.

-- Source: https://github.com/mperkins0155/MIRIX | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
-- Provided via justclaw.it.com; keep this notice with the code.
-- ============================================================================
-- Mirix PostgreSQL Initialization Script
-- ============================================================================
-- This script runs automatically on first database startup.
-- It sets up the required extensions and initial configuration.
-- ============================================================================

-- Enable pgvector extension for vector similarity search
-- This is required for storing and querying embeddings
CREATE EXTENSION IF NOT EXISTS vector;

-- Enable additional useful e

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key