加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

PostgreSQL常用数据类型

发布时间:2020-12-13 17:26:26 所属栏目:百科 来源:网络整理
导读:一、数据类型 Name Aliases Description bigint int8 signed eight-byte integer bigserial serial8 autoincrementing eight-byte integer bit [ ( n ) ] fixed-length bit string bit varying [ ( n ) ] varbit variable-length bit string boolean bool lo

一、数据类型

Name Aliases Description
bigint int8 signed eight-byte integer
bigserial serial8 autoincrementing eight-byte integer
bit [ (n) ] fixed-length bit string
bit varying [ (n) ] varbit variable-length bit string
boolean bool logical Boolean (true/false)
box rectangular box on a plane
bytea binary data ("byte array")
character [ (n) ] char [ (n) ] fixed-length character string
character varying [ (n) ] varchar [ (n) ] variable-length character string
cidr IPv4 or IPv6 network address
circle circle on a plane
date calendar date (year,month,day)
double precision float8 double precision floating-point number (8 bytes)
inet IPv4 or IPv6 host address
integer int,int4 signed four-byte integer
interval [fields] [ (p) ] time span
json JSON data
line infinite line on a plane
lseg line segment on a plane
macaddr MAC (Media Access Control) address
money currency amount
numeric [ (p,s) ] decimal [ (p,255); padding:0.5ex"> exact numeric of selectable precision
path geometric path on a plane
point geometric point on a plane
polygon closed geometric path on a plane
real float4 single precision floating-point number (4 bytes)
smallint int2 signed two-byte integer
smallserial serial2 autoincrementing two-byte integer
serial serial4 autoincrementing four-byte integer
text time [ (p) ] [ without time zone ] time of day (no time zone)
time [ (p) ] with time zone timetz time of day,including time zone
timestamp [ (p) ] [ without time zone ] date and time (no time zone)
timestamp [ (p) ] with time zone timestamptz date and time,255); padding:0.5ex"> tsquery text search query
tsvector text search document
txid_snapshot user-level transaction ID snapshot
uuid universally unique identifier
xml XML data
一个表能包含的字段数目。 根据字段类型的不同,这个数目可能在250到1600之间

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读