PostgreSQL

Скачать в pdf «PostgreSQL»


For these reasons, each column in a relational database can hold only one type of data. You cannot mix data types within a column.


This limitation can cause some difficulties. For example, ourfriend table includes an age column of type integer. Only whole numbers can be placed in that column. The values “I will ask for his age soon” or “She will not tell me her age” cannot be placed in that column. Null can represent “I do not know her age.” The solution is to create an agejxmments column of type CHAR() to hold comments that cannot be placed in the age field.


Category


Type


Description


Character string


TEXT


variable storage length


VARCHAR(length)


variable storage length with maximum length


CHAR (length)


fixed storage length, blank-padded to length, internally BPCHAR


Number


INTEGER


integer, ±2 billion range, internally INT4


INT2


integer, ±32 thousand range


INT8


integer, ±4 x 1018 range


OID


object identifier


NUMERIC (freeis ion, decimal)


number, user-defined precision and decimal location


FLOAT


floating-point number, 15-digit precision, internally FLOATS


FL0AT4


floating-point number, 6-digit precision


Temporal


DATE


date


TIME


time


TIMESTAMP


date and time


INTERVAL


interval of time


Logical


BOOLEAN


boolean, true ox false


Geometric


POINT


point


LSEG

Скачать в pdf «PostgreSQL»