langchain.js
    Preparing search index...
    interface PostgresStoreConfig {
        connectionOptions: string | PoolConfig;
        ensureTables?: boolean;
        index?: IndexConfig;
        schema?: string;
        textSearchLanguage?: string;
        ttl?: TTLConfig;
    }
    Index

    Properties

    connectionOptions: string | PoolConfig

    PostgreSQL connection string or connection configuration object.

    // Connection string
    "postgresql://user:password@localhost:5432/database"

    // Configuration object
    {
    host: "localhost",
    port: 5432,
    database: "mydb",
    user: "postgres",
    password: "password"
    }
    ensureTables?: boolean

    Whether to automatically create tables if they don't exist.

    true
    
    index?: IndexConfig

    Vector search configuration for semantic search capabilities. If provided, enables vector similarity search using pgvector extension.

    schema?: string

    Database schema name to use for store tables.

    "public"
    
    textSearchLanguage?: string

    Language for PostgreSQL full-text search operations. Supports any language configuration available in PostgreSQL.

    "english"
    
    ttl?: TTLConfig

    TTL configuration for automatic expiration of items.