- Component lists the components that are commonly considered part of SQL.
- Supported shows CockroachDBβs level of support for the component.
- Type indicates whether the component is part of the SQL Standard or is an Extension created by Cockroach Labs or others.
- Details provides greater context about the component.
Features
Row values
| Component | Supported | Type | Details |
|---|---|---|---|
ARRAY | β | Standard | |
AUTO INCREMENT(Automatic key generation) | Alternative | Common Extension | |
BIT | β | Standard | |
BOOLEAN | β | Standard | |
BYTES | β | CockroachDB Extension | |
COLLATE | β | Standard | |
DATE | β | Standard | |
DECIMAL, NUMERIC | β | Standard | |
ENUM | β | PostgreSQL Extension | |
FLOAT, REAL | β | Standard | |
INET | β | PostgreSQL Extension | |
INT | β | Standard | |
INTERVAL | β | Standard | |
JSON/JSONB | β | Common Extension | |
NULL | β | Standard | |
OID | β | PostgreSQL Extension | |
SERIAL | β | PostgreSQL Extension | |
SET | β | MySQL | Only allow rows to contain values from a defined set of terms. |
STRING, CHARACTER | β | Standard | |
TIME | β | Standard | |
TIMESTAMP/TIMESTAMPTZ | β | Standard | |
TSQUERY | β | Standard | |
TSVECTOR | β | Standard | |
UNSIGNED INT | β | Common Extension | UNSIGNED INT causes numerous casting issues, so we do not plan to support it. |
UUID | β | PostgreSQL Extension | |
| Identifiers | β | Standard | . See also . |
| Key-value pairs | Alternative | Extension | |
| XML | β | Standard | XML data can be stored as BYTES, but we do not offer XML parsing. |
Constraints
| Component | Supported | Type | Details |
|---|---|---|---|
| Not Null | β | Standard | |
| Unique | β | Standard | |
| Primary Key | β | Standard | |
| Check | β | Standard | |
| Foreign Key | β | Standard | |
| Default Value | β | Standard |
Transactions
| Component | Supported | Type | Details |
|---|---|---|---|
| Transactions (ACID semantics) | β | Standard | |
BEGIN | β | Standard | |
COMMIT | β | Standard | |
ROLLBACK | β | Standard | |
SAVEPOINT | β | Standard with CockroachDB extensions | CockroachDB supports nested transactions using |
Indexes
| Component | Supported | Type | Details |
|---|---|---|---|
| Indexes | β | Common Extension | |
| Multi-column indexes | β | Common Extension | We do not limit on the number of columns indexes can include |
| Covering indexes | β | Common Extension | |
| GIN indexes | β | Common Extension | |
| Trigram indexes | β | PostgreSQL Extension | |
| Partial indexes | β | Common Extension | |
| Spatial indexes | β | Common Extension | |
| Multiple indexes per query | Partial | Common Extension | |
| Full-text indexes | β | Common Extension | |
| Expression indexes | β | Common Extension | |
| Prefix indexes | β | Common Extension | Implement using |
| Hash indexes | β | Common Extension | Improves performance of queries looking for single, exact values |
| Hash-sharded indexes | β | CockroachDB Extension |
Schema changes
| Component | Supported | Type | Details |
|---|---|---|---|
ALTER TABLE | β | Standard | |
| Database renames | β | Standard | |
| Table renames | β | Standard | |
| Column renames | β | Standard | |
| Altering a columnβs data type | β | Standard | |
| Adding columns | β | Standard | |
| Removing columns | β | Standard | |
| Adding constraints | β | Standard | |
| Removing constraints | β | Standard | |
| Index renames | β | Standard | |
| Adding indexes | β | Standard | |
| Removing indexes | β | Standard | |
| Altering a primary key | β | Standard | |
| Adding user-defined schemas | β | Standard | |
| Removing user-defined schemas | β | Standard | |
| Altering user-defined schemas | β | Standard |
Statements
| Component | Supported | Type | Details |
|---|---|---|---|
| Common statements | β | Standard, PostgreSQL/CockroachDB Extension | |
UPSERT | β | PostgreSQL, MSSQL Extension | |
EXPLAIN | β | Common Extension | |
SELECT ... INTO | β | Common Extension | . |
SELECT FOR UPDATE | β | Common Extension |
Clauses
| Component | Supported | Type | Details |
|---|---|---|---|
| Common clauses | β | Standard | |
LIMIT | β | Common Extension | Limit the number of rows a statement returns. For more information, see . |
LIMIT with OFFSET | β | Common Extension | Skip a number of rows, and then limit the size of the return set. For more information, see . |
RETURNING | β | Common Extension | Retrieve a table of rows statements affect. For examples, see the and documentation. |
Table expressions
| Component | Supported | Type | Details |
|---|---|---|---|
| Table and View references | β | Standard | |
AS in table expressions | β | Standard | |
JOIN (INNER, LEFT, RIGHT, FULL, CROSS) | β | Standard | |
| Sub-queries as table expressions | Partial | Standard | Non-correlated subqueries are , as are most . |
| Table generator functions | Partial | PostgreSQL Extension | |
WITH ORDINALITY | β | CockroachDB Extension |
Scalar expressions and Boolean formulas
| Component | Supported | Type | Details |
|---|---|---|---|
| Common functions | β | Standard | |
| Common operators | β | Standard | |
IF/CASE/NULLIF | β | Standard | |
COALESCE/IFNULL | β | Standard | |
AND/OR | β | Standard | |
LIKE/ILIKE | β | Standard | |
SIMILAR TO | β | Standard | |
| Matching using POSIX regular expressions | β | Common Extension | |
EXISTS | Partial | Standard | Non-correlated subqueries are , as are most . Works only with small data sets. |
| Scalar subqueries | Partial | Standard | Non-correlated subqueries are , as are most . Works only with small data sets. |
| Bitwise arithmetic | β | Common Extension | |
| Array constructors and subscripting | Partial | PostgreSQL Extension | Array expression documentation: and |
COLLATE | β | Standard | |
| Column ordinal references | β | CockroachDB Extension | |
| Type annotations | β | CockroachDB Extension |
Permissions
| Component | Supported | Type | Details |
|---|---|---|---|
| Users | β | Standard | |
| Roles | β | Standard | |
| Object ownership | β | Common Extension | |
| Privileges | β | Standard | |
| Default privileges | β | PostgreSQL Extension |
Miscellaneous
| Component | Supported | Type | Details |
|---|---|---|---|
| Column families | β | CockroachDB Extension | |
| Computed columns (stored and virtual) | β | Common Extension | |
ON UPDATE expressions | β | MySQL Extension | |
| Multi-region capabilities | β | CockroachDB Extension | |
| System catalog schemas | β | Standard, PostgreSQL/CockroachDB Extension | (CockroachDB Extension) (Standard) (PostgreSQL Extension) (PostgreSQL Extension) |
| Sequences | β | Common Extension | |
| Identity columns | β | Common Extension | |
| Views | β | Standard | |
| Materialized views | β | Common Extension | |
| Window functions | β | Standard | |
| Common table expressions | Partial | Common Extension | |
| Stored procedures | Partial | Common Extension | |
| Cursors | Partial | Standard | |
| Triggers | Partial | Standard | |
| Row-level TTL | β | Common Extension | Automatically delete expired rows. For more information, see . |
| User-defined functions | Partial | Standard | |
CREATE EXTENSION "uuid-ossp" | β | Common Extension | Provides access to several additional . Note that these UUID functions are available without typing CREATE EXTENSION "uuid-ossp". CockroachDB does not have full support for CREATE EXTENSION. |

