pennate 发表于 2016-11-21 09:54:20

Postgresql:内置数据类型(data type)

sql standard
sqlserver
postgresql
postgresql
aliases
description
  bigint
  bigint
  bigint
  int8
  signed eight-byteinteger:有符号8字节整数
   
   
  bigserial
  serial8
  autoincrementingeight-byte integer:自增属性的 bigint
  bit
  binary
  bit [ (n) ]
 
  fixed-length bitstring:定长位串
  bit varying
  varbinary
  bit varying [ (n) ]
  varbit
  variable-length bitstring:变长位串
  boolean
  bit
  boolean
  bool
  logical boolean(true/false):布尔值
   
   
  box
 
  rectangular box ona plane
   
   
  bytea
 
  binary data("byte array")
  character varying
  varchar
  character varying [(n) ]
  varchar [ (n) ]
  variable-lengthcharacter string:变长字符串(长度有限制)
  varchar
  character
  char
  character [ (n) ]
  char [ (n) ]
  fixed-lengthcharacter string:定长字符串
  char
   
   
  cidr
 
  ipv4 or ipv6network address
   
   
  circle
 
  circle on a plane
  date
  date
  date
 
  calendar date(year, month, day):日期(仅)
  double precision
  float()
  double precision
  float8
  double precisionfloating-point number (8 bytes):双精度8字节浮点数
   
   
  inet
 
  ipv4 or ipv6 hostaddress
  integer
  int
  integer
  int, int4
  signed four-byteinteger:有符号4字节整数【一般意义上的整数】
  inteval
   
  interval [ fields ][ (p) ]
 
  time span:时间间隔值
   
   
  line
 
  infinite line on aplane
   
   
  lseg
 
  line segment on aplane
   
   
  macaddr
 
  mac (media accesscontrol) address
   
  money
  money
 
  currency amount
  numeric
  numeric
  numeric [ (p, s) ]
  decimal [ (p, s) ]
  exact numeric ofselectable precision:高精度定点数
  decimal
  decimal
   
   
  path
 
  geometric path on aplane
   
   
  point
 
  geometric point ona plane
   
   
  polygon
 
  closed geometricpath on a plane
  real
  real
float()
  real
  float4
  single precisionfloating-point number (4 bytes):单精度4字节浮点数
  smallint
  smallint
  smallint
  int2
  signed two-byteinteger:小整数
   
   
  smallserial
  serial2
  autoincrementingtwo-byte integer:自增属性的smallint
   
   
  serial
  serial4
  autoincrementingfour-byte integer:自增属性的int
   
  text
varchar(max)
  text
 
  variable-lengthcharacter string:变长大字符串(长度足够大)
  time without timezone
  time
  time [ (p) ]
 
  time of day (notime zone):一天内的时间值,无时区
  time with time zone
   
  time [ (p) ] withtime zone
  timetz
  time of day,including time zone:一天内的时间值,有时区
  timestamp withouttime zone
  datetime
  timestamp [ (p) ]
 
  date and time (notime zone):日期时间,无时区
  datetime2
  timestamp with timezone
  datetimeoffset
  timestamp [ (p) ]with time zone
  timestamptz
  date and time,including time zone:日期时间,有时区
   
   
  tsquery
 
  text search query
   
   
  tsvector
 
  text searchdocument
   
   
  txid_snapshot
 
  user-leveltransaction id snapshot
   
  uniqueidentifier
  uuid
 
  universally uniqueidentifier:唯一标识类型
  xml
  xml
  xml
 
  xml data:xml数据类型
   
   
  json
 
  json data
  21
  21
  39
  15
  39
页: [1]
查看完整版本: Postgresql:内置数据类型(data type)