Postgresql:内置数据类型(data type)
2017-07-10 10:53
519 查看
sql standard | sqlserver | postgresql | postgresql aliases | description | |
bigint | bigint | bigint | int8 | signed eight-byte integer:有符号8字节整数 | |
| | bigserial | serial8 | autoincrementing eight-byte integer:自增属性的 bigint | |
bit | binary | bit [ (n) ] | | fixed-length bit string:定长位串 | |
bit varying | varbinary | bit varying [ (n) ] | varbit | variable-length bit string:变长位串 | |
boolean | bit | boolean | bool | logical boolean (true/false):布尔值 | |
| | box | | rectangular box on a plane | |
| | bytea | | binary data ("byte array") | |
character varying | varchar | character varying [ (n) ] | varchar [ (n) ] | variable-length character string:变长字符串(长度有限制) | |
varchar | |||||
character | char | character [ (n) ] | char [ (n) ] | fixed-length character string:定长字符串 | |
char | |||||
| | cidr | | ipv4 or ipv6 network address | |
| | circle | | circle on a plane | |
date | date | date | | calendar date (year, month, day):日期(仅) | |
double precision | float() | double precision | float8 | double precision floating-point number (8 bytes):双精度8字节浮点数 | |
| | inet | | ipv4 or ipv6 host address | |
integer | int | integer | int, int4 | signed four-byte integer:有符号4字节整数【一般意义上的整数】 | |
inteval | | interval [ fields ] [ (p) ] | | time span:时间间隔值 | |
| | line | | infinite line on a plane | |
| | lseg | | line segment on a plane | |
| | macaddr | | mac (media access control) address | |
| money | money | | currency amount | |
numeric | numeric | numeric [ (p, s) ] | decimal [ (p, s) ] | exact numeric of selectable precision:高精度定点数 | |
decimal | decimal | ||||
| | path | | geometric path on a plane | |
| | point | | geometric point on a plane | |
| | polygon | | closed geometric path on a plane | |
real | real float() | real | float4 | single precision floating-point number (4 bytes):单精度4字节浮点数 | |
smallint | smallint | smallint | int2 | signed two-byte integer:小整数 | |
| | smallserial | serial2 | autoincrementing two-byte integer:自增属性的smallint | |
| | serial | serial4 | autoincrementing four-byte integer:自增属性的int | |
| text varchar(max) | text | | variable-length character string:变长大字符串(长度足够大) | |
time without time zone | time | time [ (p) ] [ without time zone ] | | time of day (no time zone):一天内的时间值,无时区 | |
time with time zone | | time [ (p) ] with time zone | timetz | time of day, including time zone:一天内的时间值,有时区 | |
timestamp without time zone | datetime | timestamp [ (p) ] [ without time zone ] | | date and time (no time zone):日期时间,无时区 | |
datetime2 | |||||
timestamp with time zone | datetimeoffset | timestamp [ (p) ] with time zone | timestamptz | date and time, including time zone:日期时间,有时区 | |
| | tsquery | | text search query | |
| | tsvector | | text search document | |
| | txid_snapshot | | user-level transaction id snapshot | |
| uniqueidentifier | uuid | | universally unique identifier:唯一标识类型 | |
xml | xml | xml | | xml data:xml数据类型 | |
| | json | | json data | |
21 | 21 | 39 | 15 | 39 |
相关文章推荐
- Postgresql:内置数据类型(data type)
- 获取Oracle表结构时,两种OleDb驱动得到的列数据类型“DATA_TYPE”值的类型不同
- 【转载】MFC数据类型(Data Type)
- JavaSE第二讲:原生数据类型 Primitive Data Type
- SAP HANA的数据类型(SAP HANA DATA Type)
- CORBA Programming with TAO - 3.IDL Data Type(数据类型与Mapping)
- [Ant][StartWithAnt] 第六章 数据类型Data Type
- Java SE 第二讲(原生数据类型 Primitive Data Type)
- JavaSE第二讲:原生数据类型 Primitive Data Type
- JavaSE第二讲:原生数据类型 Primitive Data Type
- JavaSE第二讲:原生数据类型 Primitive Data Type
- Flex学习笔记(四)——数据类型的操作(DataType)
- C++Notes03_数据类型(Data Type)
- firebird的数据类型(datatype)
- Oracle内置数据类型(Built-in Data Types)
- CORBA Programming with TAO - 3.IDL Data Type(数据类型与Mapping)例子常见问题篇
- Java SE 第三讲(原生数据类型使用陷阱 Pitfall of Primitive Data Type)
- JavaSE第二讲:原生数据类型 Primitive Data Type
- JavaSE第二讲:原生数据类型 Primitive Data Type
- JavaSE第二讲:原生数据类型 Primitive Data Type