当前位置:Gxlcms > 数据库问题 > PostgreSQL 数据类型

PostgreSQL 数据类型

时间:2021-07-01 10:21:17 帮助过:262人阅读

数值类型

数值类型由两个字节,4字节和8字节的整数,4字节和8字节的浮点数和可选精度的小数。下表列出了可用的类型。 www.yiibai.com

NameStorage SizeDescriptionRange
int2 2 bytes small-range integer -32768 to +32767
int4 4 bytes typical choice for integer -2147483648 to +2147483647
int8 8 bytes large-range integer -9223372036854775808 to 9223372036854775807
decimal variable user-specified precision,exact up to 131072 digits before the decimal point; up to 16383 digits after the decimal point
float4 4 bytes variable-precision,inexact 6 decimal digits precision
float8 8 bytes variable-precision,inexact 15 decimal digits precision
serial2 2 bytes small autoincrementing integer 1 to 32767
serial4 4 bytes autoincrementing integer 1 to 2147483647
serial8 8 bytes large autoincrementing integer 1 to 9223372036854775807

PostgreSQL 数据类型

标签:des   rem   after   choice   name   精度   pre   浮点数   size   

人气教程排行