Skip to main content

Data Type Mappings for PostgreSQL

The following table shows the equivalent ClickHouse data types for Postgres.

Postgres Data TypeClickHouse Type
DATEDate
TIMESTAMPDateTime
REALFloat32
DOUBLEFloat64
DECIMAL, NUMERICDecimal
SMALLINTInt16
INTEGERInt32
BIGINTInt64
SERIALUInt32
BIGSERIALUInt64
TEXT, CHARString
INTEGERNullable(Int32)
ARRAYArray
FLOAT4Float32
BOOLEANBool
VARCHARString
BITString
BIT VARYINGString
BYTEAString
NUMERICDecimal
GEOGRAPHYPoint, Ring, Polygon, MultiPolygon
GEOMETRYPoint, Ring, Polygon, MultiPolygon
INETIPv4, IPv6
MACADDRString
CIDRString
HSTOREMap(K, V), Map(K,Variant)
UUIDUUID
ARRAY<T>ARRAY(T)
JSON*String, Variant, Nested, Tuple
JSONBString

* Production support for JSON in ClickHouse is under development. Currently users can either map JSON as String, and use JSON functions, or map the JSON directly to Tuples and Nested if the structure is predictable. Read more about JSON here.