CockroachDB: API & SQL Compatibility
Docs-backedThe primary interface is SQL over the PostgreSQL wire protocol — no proprietary API to learn. Standard SQL DDL/DML works. CockroachDB adds REGIONAL BY ROW for geo-partitioning and AS OF SYSTEM TIME for historical reads at specific timestamps — both uniquely useful for agents operating across regions or needing point-in-time data views. IMPORT and EXPORT commands handle bulk data operations. The DB Console exposes a REST API for cluster metrics and statement diagnostics. JSON column support (JSONB) enables flexible schema patterns. Key SQL gaps agents may hit: no custom aggregates, limited trigger support, no LISTEN/NOTIFY for real-time notifications (agents needing event-driven patterns should use changefeeds instead).