Welcome! 閮餃
蝢撖園 蝢撖嗥曄 蝢撖嗉憯 蝢撖嗉賣 蝢撖嗅啣

Advanced

Change History

Message: PostgreSQL詨潸(Numeric Data Types)亥”

Changed By: HP
Change Date: February 11, 2010 04:28PM

PostgreSQL詨潸(Numeric Data Types)亥”
刻身摰 PostgreSQL 鞈摨急蝬撣豢典堆蝭甇方”嫣噶憭批振亥岷嚗

<TABLE BORDER="1" ><COL><COL><COL><COL><THEAD><TR><TH>Name</TH><TH>Storage Size</TH><TH>Description</TH><TH>Range</TH></TR></THEAD><TBODY><TR><TD><TT CLASS="TYPE">smallint</TT></TD><TD>2 bytes</TD><TD>small-range integer</TD><TD>-32768 to +32767</TD></TR><TR><TD><TT CLASS="TYPE">integer</TT></TD><TD>4 bytes</TD><TD>usual choice for integer</TD><TD>-2147483648 to +2147483647</TD></TR><TR><TD><TT CLASS="TYPE">bigint</TT></TD><TD>8 bytes</TD><TD>large-range integer</TD><TD>-9223372036854775808 to 9223372036854775807</TD></TR><TR><TD><TT CLASS="TYPE">decimal</TT></TD><TD>variable</TD><TD>user-specified precision, exact</TD><TD>no limit</TD></TR><TR><TD><TT CLASS="TYPE">numeric</TT></TD><TD>variable</TD><TD>user-specified precision, exact</TD><TD>no limit</TD></TR><TR><TD><TT CLASS="TYPE">real</TT></TD><TD>4 bytes</TD><TD>variable-precision, inexact</TD><TD>6 decimal digits precision</TD></TR><TR><TD><TT CLASS="TYPE">double precision</TT></TD><TD>8 bytes</TD><TD>variable-precision, inexact</TD><TD>15 decimal digits precision</TD></TR><TR><TD><TT CLASS="TYPE">serial</TT></TD><TD>4 bytes</TD><TD>autoincrementing integer</TD><TD>1 to 2147483647</TD></TR><TR><TD><TT CLASS="TYPE">bigserial</TT></TD><TD>8 bytes</TD><TD>large autoincrementing integer</TD><TD>1 to 9223372036854775807</TD></TR></TBODY></TABLE>

箸砌撣貊函 integer 憭批臬蝑蝝(billion)嚗bigint (big integer) 92 砍(鈭)
R><TH>Name</TH><TH>Storage Size</TH><TH>Description</TH><TH>Range</TH></TR></THEAD><TBODY><TR><TD><TT CLASS="TYPE">smallint</TT></TD><TD>2 bytes</TD><TD>small-range integer</TD><TD>-32768 to +32767</TD></TR><TR><TD><TT CLASS="TYPE">integer</TT></TD><TD>4 bytes</TD><TD>usual choice for integer</TD><TD>-2,147,483,648 to +2,147,483,647</TD></TR><TR><TD><TT CLASS="TYPE">bigint</TT></TD><TD>8 bytes</TD><TD>large-range integer</TD><TD>-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807</TD></TR><TR><TD><TT CLASS="TYPE">decimal</TT></TD><TD>variable</TD><TD>user-specified precision, exact</TD><TD>no limit</TD></TR><TR><TD><TT CLASS="TYPE">numeric</TT></TD><TD>variable</TD><TD>user-specified precision, exact</TD><TD>no limit</TD></TR><TR><TD><TT CLASS="TYPE">real</TT></TD><TD>4 bytes</TD><TD>variable-precision, inexact</TD><TD>6 decimal digits precision</TD></TR><TR><TD><TT CLASS="TYPE">double precision</TT></TD><TD>8 bytes</TD><TD>variable-precision, inexact</TD><TD>15 decimal digits precision</TD></TR><TR><TD><TT CLASS="TYPE">serial</TT></TD><TD>4 bytes</TD><TD>autoincrementing integer</TD><TD>1 to 2147483647</TD></TR><TR><TD><TT CLASS="TYPE">bigserial</TT></TD><TD>8 bytes</TD><TD>large autoincrementing integer</TD><TD>1 to 9223372036854775807</TD></TR></TBODY></TABLE>

箸砌撣貊函 integer 憭批臬蝑蝝(2.1 billion)嚗bigint (big integer) 92 砍(鈭)
n)嚗bigint (big integer) 92 砍(鈭)

Reference:
http://www.postgresql.org/docs/8.3/static/datatype-numeric.html
Changed By: HP
Change Date: October 20, 2009 07:00PM

PostgreSQL詨潸(Numeric Data Type)亥”Types)亥”
刻身摰 PostgreSQL 鞈摨急蝬撣豢典堆蝭甇方”嫣噶憭批振亥岷嚗

NameStorage SizeDescriptionRange
smallint2 bytessmall-range integer-32768 to +32767
integer4 bytesusual choice for integer-2147483648 to +2147483647
bigint8 byteslarge-range integer-9223372036854775808 to 9223372036854775807
decimalvariableuser-specified precision, exactno limit
numericvariableuser-specified precision, exactno limit
real4 bytesvariable-precision, inexact6 decimal digits precision
double precision8 bytesvariable-precision, inexact15 decimal digits precision
serial4 bytesautoincrementing integer1 to 2147483647
bigserial8 byteslarge autoincrementing integer1 to 9223372036854775807


箸砌撣貊函 integer 憭批臬蝑蝝(billion)嚗bigint (big integer) 92 砍(鈭)
n)嚗bigint (big integer) 92 砍(鈭)

Reference:
http://www.postgresql.org/docs/8.3/static/datatype-numeric.html

Original Message

雿: HP
Date: October 09, 2009 04:56PM

PostgreSQL詨潸(Numeric Data Type)亥”Types)亥”
刻身摰 PostgreSQL 鞈摨急蝬撣豢典堆蝭甇方”嫣噶憭批振亥岷嚗

NameStorage SizeDescriptionRange
smallint2 bytessmall-range integer-32768 to +32767
integer4 bytesusual choice for integer-2147483648 to +2147483647
bigint8 byteslarge-range integer-9223372036854775808 to 9223372036854775807
decimalvariableuser-specified precision, exactno limit
numericvariableuser-specified precision, exactno limit
real4 bytesvariable-precision, inexact6 decimal digits precision
double precision8 bytesvariable-precision, inexact15 decimal digits precision
serial4 bytesautoincrementing integer1 to 2147483647
bigserial8 byteslarge autoincrementing integer1 to 9223372036854775807


箸砌撣貊函 integer 憭批臬蝑蝝(billion)嚗bigint (big integer) 92 砍(鈭)
n)嚗bigint (big integer) 92 砍(鈭)

Reference:
http://www.postgresql.org/docs/8.3/static/datatype-numeric.html