Overview
Relyt provides a variety of native data types, including numeric, date and time, character, and Boolean types.
The following table provides a general overview of each type.
Name | Storage size | Value range | Description |
---|---|---|---|
bigint | 8 bytes | -9223372036854775808 to 9223372036854775807 | Large-range integers. |
boolean | 1 byte | true/false, t/f, yes/no, y/n, and 1/0 | Whether a condition is true or not. |
date | 4 bytes | 0001-01-01 to 9999-12-31 | Measures the number of days since January 1, 1970. |
decimal | Variable | 128-bit signed integers with up to 38 digits of precision | Exact numbers with user-specified precision. |
double precision | 8 bytes | 15 decimal digits precision | Numbers with a fractional part. |
integer | 4 bytes | -2147483648 to +2147483647 | Integers. This type is the common choice for storing integers, because it offers the best balance between range, size, and performance. |
interval | 16 bytes | -178000000 years to 178000000 years | The time interval. It is sensitive to time zone differences. |
real | 4 bytes | 6 decimal digits precision | Single-precision floating-point numbers. |
smallint | 2 bytes | -32768 to +32767 | Small-range integers. |
text | Maximum: 2 MB | Strings of any length | Variable-length character strings. |
timestamp | 8 bytes | 0001-01-01 00:00:00 to 9999-12-31 23:59:59 | The date and time, excluding the time zone. |
timestamp with time zone | 8 bytes | 0001-01-01 00:00:00~9999-12-31 23:59:59 (UTC) | The date and time, including the time zone. |
varchar | Maximum: 2 MB | Strings of any length | Variable-length character strings. |
bytea | Maximum: 500 MB | Binary data of any length | Variable-length binary data. |
roaringbitmap | Maximum: 500 MB | A collection of integer values | Efficient, compressed bitmap structure. |
important
Relyt does not allow defining columns of data type interval
in DDL because Relyt does not support the storage of intervals.