Skip to main content

Data Types

Hyper provides a rich set of native data types.

Generally, Hyper's type system can be divided into two buckets: atomic types, which describe single values, and composite types, which describe collections of values. However, this distinction is made for educational purposes only; both kinds are equally supported, and there is no fundamental limitation applying to either category.

Atomic Types

Atomic types comprise fundamental, general-purpose data types. The following table lists all available atomic types. Most of the alternative names listed in the "Aliases" column are supported for compatibility with PostgreSQL.

NameAliasesDescription
BIGINTINT8signed eight-byte integer
BOOLEANBOOLBoolean value with ternary logic (true/false/unknown)
BYTESbinary data ("byte array")
CHARACTER [ (n) ]CHAR [ (n) ]fixed-length character string
CHARACTER VARYING (n)VARCHAR (n)variable-length character string with limit
DATEcalendar date (year, month, day)
REALFLOAT4single precision floating-point number (4 bytes)
DOUBLE PRECISIONFLOAT, FLOAT8double precision floating-point number (8 bytes)
INTEGERINT, INT4signed four-byte integer
INTERVALtime span; not supported in Tableau
NUMERIC [ (p, s) ]DECIMAL [ (p, s) ]exact numeric of selectable precision
SMALLINTINT2signed two-byte integer
TEXTvariable-length character string
TIME [ WITHOUT TIME ZONE ]time of day (no time zone)
TIMESTAMP [ WITHOUT TIME ZONE ]date and time (no time zone)
TIMESTAMP WITH TIME ZONETIMESTAMPTZdate and time, including time zone
GEOGRAPHYa geography object
note

Persisting NUMERICs with a precision greater than 18 requires at least database version 3.

note

Persisting 32-bit floating point values (e.g., type REAL) requires at least database version 4. Up until Hyper API release 0.0.18825 Hyper used 64-bit floating points for all float types (i.e., also for REAL).

Composite Types

Composite types are collections of multiple data items in a single SQL value. They allow for dedicated schema denormalization, which can be useful for specific domains, such as machine learning applications.

Array

An array is an ordered sequence of values. Arrays in Hyper are strongly-typed and can be built from all supported atomic types. See Array Type for more details.

Further Reading