AuroraSQL Reference
AuroraSQL is GalaxDB's SQL dialect. It extends standard SQL with AI-native features: embedding columns, semantic search, time-travel queries, training export, and near-dedup. Standard SQL (SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, DROP TABLE) works as expected.
CREATE TABLE
Create tables with optional EMBEDDING MODEL columns
INSERT & BULK INSERT
Insert single rows or bulk-insert many rows
SELECT & SEMANTIC_MATCH
Query data with SQL and semantic similarity search
UPDATE & DELETE
Modify and remove rows
Version Tags
CREATE VERSION TAG and AT VERSION
BACKUP & RESTORE
Back up and restore databases
ANALYZE
Update table statistics for the query planner
Overview
GalaxDB uses the PostgreSQL wire protocol, so any PostgreSQL client connects without modification. The SQL parser (AuroraSQL) handles standard SQL via sqlparser-rs and adds GalaxDB-specific extensions as a pre-processing layer.
AuroraSQL Extensions
These are the SQL extensions unique to GalaxDB:
| Extension | Description |
|---|---|
| EMBEDDING MODEL ... DIM n | Column modifier for automatic embedding computation |
| SEMANTIC_MATCH(col, query, threshold) | Semantic similarity search in WHERE clause |
| WHERE NOT DUPLICATE | MinHash LSH near-dedup filter |
| AT VERSION tag_or_timestamp | Time-travel query modifier |
| CREATE VERSION TAG | Create a named snapshot |
| BULK INSERT | Efficient multi-row insert |
| BACKUP TO / RESTORE FROM | Database backup and restore |
| ANALYZE table | Update query planner statistics |
| SHOW EMBEDDING HEALTH | Check sidecar status |
Standard SQL
All standard SQL works as expected:
SQL
-- DDL
CREATE TABLE users (id INT PRIMARY KEY, name TEXT, age INT);
DROP TABLE users;
-- DML
INSERT INTO users (id, name, age) VALUES (1, 'Alice', 30);
UPDATE users SET age = 31 WHERE id = 1;
DELETE FROM users WHERE id = 1;
-- Queries
SELECT id, name FROM users WHERE age > 25 ORDER BY name LIMIT 10;
SELECT COUNT(*), AVG(age) FROM users;
-- Joins (standard SQL)
SELECT u.name, o.total
FROM users u
JOIN orders o ON u.id = o.user_id
WHERE o.total > 100;