Readyset Docs

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

Monetary types

TypeSupportedNotes
MONEY✖️

Character types

TypeSupportedNotes
CHAR VARCHAR TEXT✔️
"CHAR"✔️
CITEXT✔️

Binary types

TypeSupportedNotes
BYTEA✔️

Date and time types

TypeSupportedNotes
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

TypeSupportedNotes
BOOLEAN✔️

Enumerated types

TypeSupportedNotes
ENUM✔️

Geometric types

TypeSupportedNotes
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

TypeSupportedNotes
INET✖️
CIDR✖️
MACADDR ✖️
MACADDR8✖️

Bit string types

TypeSupportedNotes
BITBIT VARYING✔️Readyset ignores the optional length field.

Text search types

TypeSupportedNotes
tsvector✖️
tsquery✖️

UUID types

TypeSupportedNotes
UUID✔️

XML types

TypeSupportedNotes
XML✖️

JSON types

TypeSupportedNotes
JSON JSONB✔️JSON/JSONB data is replicated. Users can read the JSON/JSONB data as is.

Array types

TypeSupportedNotes
ARRAY ✔️

Composite data types

TypeSupportedNotes
CREATE TYPE <name> AS✖️

Range types

Domain types

TypeSupportedNotes
CREATE TABLE <table> (col <domain>)✖️

Object identifier types

Numeric types

TypeSupportedNotes
INT INT UNSIGNED TINYINT TINYINT UNSIGNED SMALLINT SMALLINT UNSIGNED MEDIUMINT MEDIUMINT UNSIGNED BIGINT BIGINT UNSIGNED SERIAL✔️Readyset ignores the optional display width field, except on ZEROFILL columns.
DECIMAL NUMERIC✔️
FLOAT DOUBLE REAL✔️
BIT✔️Readyset ignores the optional length field.

ZEROFILL: Deep caches return ZEROFILL columns with the same zero padding as MySQL, and support ZEROFILL columns as join, grouping, ordering and lookup keys, in comparisons, and in COALESCE with an integer fallback. A deep cache cannot be created for a query that uses a ZEROFILL column in another way, such as in CONCAT, CAST, LIKE, arithmetic, an aggregate function or a window function, including inside the definition of a view that the query reads. The same holds for a query that returns a ZEROFILL column from the right side of a LEFT JOIN, from a scalar subquery or from a UNION ALL, or that returns a join key whose other key does not have the same ZEROFILL type. Such queries can be cached as shallow caches. A table with a FLOAT(M,D) or DOUBLE(M,D) ZEROFILL column is not replicated.

Date and time types

TypeSupportedNotes
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

TypeSupportedNotes
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

TypeSupportedNotes
JSON✔️JSON data is replicated. Users can read the JSON data as is.

Spatial types

TypeSupportedNotes
POINT✔️As of stable-250522. Only ST_AsText is supported.
GEOMETRY LINESTRING POLYGON MULTIPOINT MULTILINESTRING MULTIPOLYGON GEOMETRYCOLLECTION✖️