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 (with joins, aggregates, GROUP BY / HAVING, DISTINCT, ORDER BY / LIMIT / OFFSET), INSERT, UPDATE, DELETE, CREATE TABLE, DROP TABLE, and full transactions (BEGIN / COMMIT / ROLLBACK, SAVEPOINT) - works as expected. See Types & Compatibility for the honest matrix of what is and isn't enforced.
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 |
| CREATE SEMANTIC CACHE FOR TABLE t SIMILARITY f TTL n | Cache SEMANTIC_MATCH results by query similarity |
| DROP SEMANTIC CACHE FOR TABLE t | Remove the semantic cache for a table |
| CONSISTENCY 'SEMANTIC_SNAPSHOT' | Scope AT VERSION query to exact historical vectors |
| BEGIN ISOLATION LEVEL SERIALIZABLE | Opt-in serializable snapshot isolation |
Standard SQL
All standard SQL works as expected:
-- 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;