SQL Feature Support
To understand which standard SQL features we support, refer to the following tables:
Data types
Data type | Supported | Documentation |
---|---|---|
ARRAY |
✓ | Array documentation |
BINARY |
✓ | Binary documentation |
BIT ,BYTES |
✓ | |
BOOLEAN |
✓ | Boolean documentation |
CHAR , VARCHAR , TEXT |
✓ | Character data types documentation |
COLLATE |
✓ | Collate documentation |
DATE , TIME , TIMESTAMP , INTERVAL |
✓ | Date and time data types documentation |
DEC , DECIMAL , NUMERIC |
✓ | Fixed point numbers documentation |
ENUM |
✓ | ENUM documentation |
FLOAT , REAL , DOUBLE PRECISION |
✓ | Floating point numbers documentation |
JSON , JSONB |
✓ | JSON data types documentation |
MONEY |
✓ | Money data type documentation |
SERIAL , SMALLSERIAL , BIGSERIAL |
✓ | Serial documentation |
SET |
✗ | |
SMALLINT, INT, INTEGER, BIGINT |
✓ | Integers documentation |
INT4RANGE , INT8RANGE , NUMRANGE , TSRANGE , TSTZRANGE , DATERANGE |
✓ | Range data types documentation |
UUID |
✓ | UUID documentation |
XML |
✗ | |
TSVECTOR |
✓ | |
UDT(Base, Enumerated, Range, Composite, Array, Domain types) | ✓ |
Schema operations
Operation | Supported | Documentation |
---|---|---|
Altering tables | ✓ | ALTER TABLE documentation |
Altering databases | ✓ | ALTER DATABASE documentation |
Altering columns | ✗ | |
Altering a column's data type | ✗ | |
Adding columns | ✓ | ADD COLUMN documentation |
Removing columns | ✓ | DROP COLUMN documentation |
Adding constraints | ✓ | ADD CONSTRAINT documentation |
Removing constraints | ✓ | DROP CONSTRAINT documentation |
Altering indexes | ✗ | |
Adding indexes | ✓ | CREATE INDEX documentation |
Removing indexes | ✗ | |
Altering a primary key | ✗ | |
Adding user-defined schemas | ✓ | CREATE SCHEMA documentation |
Removing user-defined schemas | ✗ | |
Altering user-defined schemas | ✗ |
Constraints
Feature | Supported | Documentation |
---|---|---|
Check | ✓ | Check documentation |
Unique | ✓ | Unique documentation |
Not Null | ✓ | Not Null documentation |
Primary Key | ✓ | Primary Key documentation |
Foreign Key | ✓ | Foreign Key documentation |
Default Value | ✗ | |
Deferrable Foreign Key constraints | ✓ | |
Deferrable Primary Key and Unique constraints | ✗ | |
Exclusion constraints | ✗ |
Indexes
Component | Supported | Documentation |
---|---|---|
Indexes | ✓ | Indexes documentation |
GIN indexes | ✓ | GIN Indexes documentation |
Partial indexes | ✓ | Partial indexes documentation |
Expression indexes | ✓ | Expression indexes |
Multi-column indexes | ✓ | |
Covering indexes | ✓ | |
Prefix indexes | ✗ | Implement using Expression indexes |
Spatial indexes | ✗ | |
Multiple indexes per query | ✗ | |
Full-text indexes | ✗ | |
GiST indexes | ✗ | |
BRIN indexes | ✗ |
Transactions
Feature | Supported | Documentation |
---|---|---|
Transactions | ✓ | Transactions documentation |
BEGIN |
✓ | BEGIN documentation |
COMMIT |
✓ | COMMIT documentation |
ROLLBACK |
✓ | ROLLBACK documentation |
SAVEPOINT |
✓ | SAVEPOINT documentation |
ROLLBACK TO SAVEPOINT |
✓ | ROLLBACK TO SAVEPOINT documentation |
Roles and Permissions
Component | Supported | Details |
---|---|---|
Users | ✓ | |
Roles | ✓ | |
Object ownership | ✓ | |
Privileges | ✓ | |
Default privileges | ✗ |
Queries
Component | Supported | Details |
---|---|---|
FROM, WHERE, GROUP BY, HAVING, DISTINCT, LIMIT/OFFSET, WITH queries | ✓ | |
EXPLAIN query plans | ✓ | |
JOINs (INNER/OUTER, LEFT/RIGHT) | ✓ | |
Expressions and Operators | ✓ | |
Common Table Expressions (CTE) and Recursive Queries | ✓ | |
Upserts (INSERT ... ON CONFLICT DO NOTHING/UPDATE) | ✓ |
Advanced SQL
Component | Supported | Details |
---|---|---|
Stored procedures | ✓ | |
User-defined functions | ✓ | |
Cursors | ✓ | |
Row-level triggers (BEFORE, AFTER, INSTEAD OF) | ✓ | |
Statement-level triggers (BEFORE, AFTER, INSTEAD OF) | ✓ | |
Deferrable triggers | ✗ | |
Transition tables (REFERENCING clause for triggers) | ✗ | |
Sequences | ✓ | |
Identity columns | ✓ | |
Views | ✓ | |
Materialized views | ✓ | |
Window functions | ✓ | |
Common table expressions | ✓ | |
Extensions | ✓ | |
Foreign data wrappers | ✓ |