Skip to content

SQL Data Types

Yellowbrick supports the following data types. The aliases listed in the table are valid alternative keywords for each data type. For more details about each type, go to the linked topic.

Data TypeAliasesDescription
BOOLEANBOOL1-byte Boolean value
SMALLINTINT216-bit signed integer
INTEGERINT, INT432-bit signed integer
BIGINTINT864-bit signed integer
DECIMALDEC, NUMERICNumeric values with a maximum precision of 38
REALFLOAT432-bit floating-point value
DOUBLE PRECISIONFLOAT, FLOAT864-bit floating-point value
UUID128-bit generated value (a sequence of lowercase or uppercase hexadecimal digits)
VARCHARCHARACTER VARYINGVariable-length character string
BYTEAVARBINARY, VARBYTEA sequence of octets (or bytes)
CHARCHARACTER, BPCHARFixed-length character string
DATEDate
TIMETime of day value
TIMESTAMPTimestamp without time zone
TIMESTAMP WITH TIME ZONETIMESTAMPTZTimestamp with time zone
IPV4IP address (4-byte)
IPV6IP address (16-byte)
MACADDRMAC address (6-byte)
MACADDR8MAC address (8-byte, EUI-64 format)
JSONStores the textual "raw" format of the JSON. It preserves the original text, whitespace and formatting. However, unlike PostgreSQL, no validation is performed
JSONBStores a binary representation of the JSON data. The binary form is optimized for fast lookups and retrieval, and it supports a set of functions for acting on the data. However, the original formatting is not preserved
GEOGRAPHYStores geospatial data representing points, lines, and polygons on the Earth's surface using geodetic coordinates

Data Types Currently Not Supported

  • INTERVAL is not supported as a declared column type for a table (INTERVAL data cannot be stored). However, functions and expressions can operate on INTERVAL literals and produce INTERVAL output values (such as in views).
  • TEXT: You can cast TEXT values to character strings or other types, but you cannot create a table with a TEXT column. Any non-constant TEXT value that the system processes is converted to a VARCHAR(64000) value internally. This behavior is inefficient so Yellowbrick recommends keeping use of TEXT values to a minimum.
  • NAME is not supported as a column type.
  • TIMETZ is not supported.
  • SERIAL is not supported.