Skip to content
Pivot is in early development and is not production ready. See Project status.

Data types

Use these types in column declarations and casts. The tables below mark support for stored columns and expressions, including query results.

CREATE TABLE measurements (
id BIGINT,
active BOOLEAN,
label VARCHAR,
amount DECIMAL(12, 2),
recorded_at TIMESTAMP,
attributes VARIANT
);
SQL type Description Column Expression
BOOLEAN TRUE or FALSE. ✓ ✓
SQL type Description Column Expression
TINYINT Signed 8-bit integer. ✓ ✓
SMALLINT Signed 16-bit integer. ✓ ✓
INTEGER Signed 32-bit integer. INT is an alias. ✓ ✓
BIGINT Signed 64-bit integer. ✓ ✓
HUGEINT Signed 128-bit integer, used by integer aggregates. - ✓
UTINYINT Unsigned 8-bit integer. ✓ ✓
USMALLINT Unsigned 16-bit integer. ✓ ✓
UINTEGER Unsigned 32-bit integer. ✓ ✓
UBIGINT Unsigned 64-bit integer. ✓ ✓
REAL IEEE 754 single-precision floating point. FLOAT is an alias. ✓ ✓
DOUBLE IEEE 754 double-precision floating point. ✓ ✓
DECIMAL(precision, scale) Exact fixed-point number. Precision is 1 through 38 and scale cannot exceed precision. ✓ ✓

HUGEINT is available in expressions and results, including integer sums, but cannot be declared as a stored column. See arithmetic and aggregate functions.

SQL type Description Column Expression
VARCHAR UTF-8 text. TEXT and STRING are aliases. ✓ ✓

See string and regular expression functions for searching, slicing, and replacing text.

SQL type Description Column Expression
DATE Calendar date without a time. ✓ ✓
TIMESTAMP Timezone-free timestamp at microsecond resolution. ✓ ✓
INTERVAL Months, days, and sub-day time used in temporal expressions. - ✓

TIMESTAMP WITH TIME ZONE and its TIMESTAMPTZ alias are not supported. Use TIMESTAMP and normalize timezone-sensitive input before loading it.

See date functions and interval arithmetic for supported operations.

SQL type Description Column Expression
VARIANT Semi-structured value with JSON-style path access. ✓ ✓

Read nested fields with dot notation or ->, and cast a field to a scalar type when needed. See VARIANT access for examples.