Which PostgreSQL extensions are supported by Lakebase, including PostGIS and search extensions?
Summary
- Lakebase is a serverless Postgres database built on Neon technology (acquired by Databricks), so it inherits Postgres compatibility and extension support.
- PostGIS, pgvector, and full-text search extensions are available in Lakebase, enabling geographic queries, vector similarity search for AI/ML workloads, and text search within the same database.
- Lakebase supports a broad set of PostgreSQL extensions for JSON handling (jsonb operators), arrays, UUID generation, and cryptography, so you can avoid maintaining separate databases for different data types.
- The architecture that powers Lakebase (Neon's serverless compute) was designed to run Postgres unmodified, so most standard PostgreSQL extensions work without custom builds.
- This extension support helps teams consolidate operational and analytical workloads: geographic data, vector embeddings, and traditional relational data can coexist in one governed database.
Which PostgreSQL extensions are supported by Lakebase, including PostGIS and search extensions?
PostgreSQL's extension ecosystem is one of its strengths. Lakebase, as a fully compatible serverless Postgres engine, supports a wide range of extensions out of the box. This means you can add geographic querying, vector search, full-text search, JSON operators, and many other capabilities to Lakebase without switching databases or managing separate infrastructure.
What is a PostgreSQL extension?
PostgreSQL extensions are packaged modules that add functionality to Postgres: new data types, operators, indexes, and query capabilities. PostGIS adds geographic types and functions. pgvector adds vector similarity search. Full-text search extensions add advanced text querying. Installing an extension takes a single SQL command; you don't need to rebuild Postgres or restart the database.
Key extensions supported in Lakebase
| Extension | Use case | Capability |
|---|---|---|
| PostGIS | Geographic and geospatial queries. Find restaurants within a radius, analyze territory coverage, route optimization. | Stores geographic points, polygons, and geometries; supports spatial indexes and distance calculations. |
| pgvector | Vector similarity search for AI and machine learning. Semantic search, recommendation, anomaly detection. | Stores dense vectors and finds similar vectors with cosine, Euclidean, or inner-product distance metrics. |
| pg_trgm | Fuzzy text matching and similarity searches. Typo-tolerant search, approximate string matching. | Token-based trigram similarity; builds GIN or GIST indexes for fast approximate searches. |
| Full-text search (built-in) | Advanced text search with ranking, phrase search, and language-specific stemming. | Supports multiple languages, custom dictionaries, and ranking algorithms. |
| uuid-ossp | Generate universally unique identifiers without external services. | Generates UUID v1, v3, v4, v5; commonly used for distributed system IDs. |
| json / jsonb | Store and query nested JSON documents, often used for event logs and API responses. | JSONB supports efficient indexing and operators for key-value lookups and array operations. |
| hstore | Key-value store within PostgreSQL, useful for unstructured metadata. | Compact storage and fast lookups for semi-structured data. |
| pgcrypto | Cryptographic functions for hashing and encryption within the database. | Generate secure hashes, encrypt columns, authenticate users without external crypto services. |
How Lakebase approaches PostgreSQL extensions
Lakebase runs Postgres unmodified, so it supports most standard PostgreSQL extensions. Supported extensions can be enabled in any Lakebase database with a single SQL command. This means you don't need separate systems: your geographic data, vector embeddings, logs, and relational data can all live together in one governed table set.
Because Lakebase is managed and serverless, you don't have to worry about extension versioning or compatibility conflicts. New minor versions of Lakebase include updated extensions, and you upgrade by simply reconnecting to your database.
Real-world scenarios
GIS and logistics: A delivery company stores pickup and drop-off locations using PostGIS. They query "find all deliveries within 5 miles of hub X" and run route-optimization algorithms directly in SQL. All the geographic logic stays in the database, not in application code.
AI-powered search: A knowledge-base platform uses pgvector to store document embeddings. When a user searches, the app computes an embedding and runs a nearest-neighbor query with pgvector's distance operators to find the most semantically similar articles.
Event log analysis: A SaaS platform logs every user action as JSON. It uses PostgreSQL's JSONB operators to filter events by fields inside the JSON, such as a specific user and action type, without flattening the JSON to columns.
Typo-tolerant search: An e-commerce site uses pg_trgm to find products even when users misspell. A misspelled search term can still match the intended product name because the trigram similarity is high enough.
FAQs
Can I install a custom extension in Lakebase?
Lakebase supports standard PostgreSQL extensions out of the box. Custom or compiled extensions that require C code are not currently supported, as they need custom builds. If an extension you need is not available, reach out to Databricks support to discuss adding it.
Does pgvector in Lakebase compete with separate vector databases?
No, they serve different purposes. pgvector stores vectors alongside relational data, making it ideal when vectors are part of a larger relational model. It's simpler to operate than maintaining both a database and a vector store. Separate vector databases excel if you're storing only vectors at massive scale.
How do I enable an extension in Lakebase?
Connect to your Lakebase database and enable the extension with the standard Postgres extension command (note that pgvector's extension name is vector). The extension is then available for all tables in that database, with no restart needed. See the Lakebase extensions documentation for the supported list.
Are extension versions tied to Postgres version upgrades?
Yes, Lakebase upgrades Postgres and its extensions together. When you upgrade to a new Lakebase version, extensions are updated as well. You should test changes in a development database before rolling to production.
Can I use both PostGIS and pgvector in the same Lakebase database?
Yes. You can create tables with geographic columns (PostGIS), tables with vector columns (pgvector), and tables with JSON columns all in one database. They all integrate with Unity Catalog governance.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.