PostgreSQL to Go Type Mapping - Zontroy

PostgreSQL to Go Type Mapping

PostgreSQL Data TypeGo Data TypeGo Nullable Data TypeGo Primitive Type
bigintint64int64
bitboolbool
booleanboolbool
bytea[]byte
characterstringstring
character varyingstringstring
date
double precisionfloat32float32
integerintint
moneyfloat64float64
numericfloat64float64
realfloat32float32
serialintint
smallintint16int16
smallserialint16int16
textstringstring
time
timestamp

Post a Comment