Supported Data Types
Readyset takes an initial snapshot of tables from a primary database and uses the database's replication stream to keep the snapshot (and cached query results) up to date as the tables change. To successfully snapshot and replicate a table, Readyset must support the data types of the columns, the character set in which the data is encoded, and any modifications to the table via writes and schema changes.
The scope of data types, character sets, and table changes supported by Readyset are described below.
Numeric types
| Type | Supported | Notes |
|---|---|---|
INT SMALLINT BIGINT | ✔️ | |
DECIMAL NUMERIC | ✔️ | |
FLOAT DOUBLE PRECISION REAL | ✔️ | |
SERIAL SMALLSERIAL BIGSERIAL | ✔️ |
Monetary types
| Type | Supported | Notes |
|---|---|---|
MONEY | ✖️ |
Character types
| Type | Supported | Notes |
|---|---|---|
CHAR VARCHAR TEXT | ✔️ | |
"CHAR" | ✔️ | |
CITEXT | ✔️ |
Binary types
| Type | Supported | Notes |
|---|---|---|
BYTEA | ✔️ |
Date and time types
| Type | Supported | Notes |
|---|---|---|
DATE TIME TIMETZ TIMESTAMP | ✔️ | |
TIMESTAMPTZ | ✔️ | Rendered as a UTC wallclock; the session TimeZone is not applied to query results. Session TimeZone must be UTC (or an equivalent like +00:00, Etc/UTC, GMT, Universal, or Zulu); SET TIME ZONE to any other value is treated as an unsupported SET and, by default, causes the connection to proxy to the upstream rather than serve from cache. |
INTERVAL | ✖️ |
Boolean typess
| Type | Supported | Notes |
|---|---|---|
BOOLEAN | ✔️ |
Enumerated types
| Type | Supported | Notes |
|---|---|---|
ENUM | ✔️ |
Geometric types
| Type | Supported | Notes |
|---|---|---|
PostGIS GEOMETRY(POINT) | ✔️ | As of stable-250522. PostGIS GEOMETRY columns are replicated, but only POINT values can be used, and only ST_AsWKT is supported. |
POINT LINE LSEG BOX PATH POLYGON CIRCLE | ✖️ | Native Postgres spatial types are not supported. |
Network address typess
Bit string types
| Type | Supported | Notes |
|---|---|---|
BITBIT VARYING | ✔️ | Readyset ignores the optional length field. |
Text search types
UUID types
| Type | Supported | Notes |
|---|---|---|
UUID | ✔️ |
XML types
| Type | Supported | Notes |
|---|---|---|
XML | ✖️ |
JSON types
| Type | Supported | Notes |
|---|---|---|
JSON JSONB | ✔️ | JSON/JSONB data is replicated. Users can read the JSON/JSONB data as is. |
Array types
| Type | Supported | Notes |
|---|---|---|
ARRAY | ✔️ |
Composite data types
| Type | Supported | Notes |
|---|---|---|
CREATE TYPE <name> AS | ✖️ |
Range types
| Type | Supported | Notes |
|---|---|---|
INT4RANGE INT8RANGE NUMRANGE TSRANGE TSTZRANGE DATERANGE | ✖️ |
Domain types
| Type | Supported | Notes |
|---|---|---|
CREATE TABLE <table> (col <domain>) | ✖️ |
Object identifier types
Numeric types
| Type | Supported | Notes |
|---|---|---|
INT INT UNSIGNED TINYINT TINYINT UNSIGNED SMALLINT SMALLINT UNSIGNED MEDIUMINT MEDIUMINT UNSIGNED BIGINT BIGINT UNSIGNED SERIAL | ✔️ | Readyset ignores the optional display width field. |
DECIMAL NUMERIC | ✔️ | |
FLOAT DOUBLE REAL | ✔️ | |
BIT | ✔️ | Readyset ignores the optional length field. |
Date and time types
| Type | Supported | Notes |
|---|---|---|
DATE DATETIME | ✔️ | |
TIMESTAMP | ✔️ | Rendered as a UTC wallclock; the session @@time_zone is not applied to query results. Session @@time_zone must be UTC (or an equivalent like +00:00, Etc/UTC, or GMT); SET @@time_zone to any other value, including SYSTEM, is treated as an unsupported SET and, by default, causes the connection to proxy to the upstream rather than serve from cache. |
TIME | ✔️ | |
YEAR | ✖️ |
String types
| Type | Supported | Notes |
|---|---|---|
CHAR VARCHAR | ✔️ | Readyset ignores the optional length field. |
BINARY VARBINARY | ✔️ | Readyset ignores the optional length field. |
BLOB TINYBLOG MEDIUMBLOB LONGBLOB | ✔️ | |
TEXT TINYTEXT MEDIUMTEXT LONGTEXT | ✔️ | |
ENUM | ✔️ | |
SET | ✖️ |
JSON types
| Type | Supported | Notes |
|---|---|---|
JSON | ✔️ | JSON data is replicated. Users can read the JSON data as is. |
Spatial types
| Type | Supported | Notes |
|---|---|---|
POINT | ✔️ | As of stable-250522. Only ST_AsText is supported. |
GEOMETRY LINESTRING POLYGON MULTIPOINT MULTILINESTRING MULTIPOLYGON GEOMETRYCOLLECTION | ✖️ |