PostgreSQL������ ����ڵ��� �� �� �ִ� ���� �⺻ �ڷ����� �����ϰ� �ִ�. ����, CREATE TYPE ������ �̿��ؼ� ���ο� �ڷ����� ���� ����� ����� �� �ִ�.
PostgreSQL���� �⺻������ �����ϴ� ��� ���� ���� �ڷ����� 표 8-1 ��ϰ� ����. "��Ī" Į���� ������ ��ü �̸����� ��κ��� PostgreSQL �������� ������ ���������� ���Ǵ� �͵��̴�. ���ٿ�, ���������θ� ����ϴ� ���̰ų�, �� �̻� ������ ���� �� �ڷ����鵵 ������, �װ͵��� ���⼭ �������� �ʴ´�.
표 8-1. �ڷ���
�̸� | ��Ī | ���� |
---|---|---|
bigint | int8 | ��ȣ �ִ� 8����Ʈ ������ |
bigserial | serial8 | �ڵ� ���� 8����Ʈ ������ |
bit [ (n) ] | ���� ���� ��Ʈ ���ڿ� | |
bit varying [ (n) ] | varbit | ���� ���� ��Ʈ ���ڿ� |
boolean | bool | ���� �Ҹ��� (��/����) |
box | ��� �� �����簢�� | |
bytea | �����ڷ� ("����Ʈ �迭") | |
character varying [ (n) ] | varchar [ (n) ] | ���� ���� ���ڿ� |
character [ (n) ] | char [ (n) ] | ���� ���� ���ڿ� |
cidr | IPv4 �Ǵ� IPv6 ��Ʈ��ũ �ּ� | |
circle | ��� �� �� | |
date | �� ��¥ (��, ��, ��) | |
double precision | float8 | 2�� ���� �ε� �Ҽ��� (8 ����Ʈ) |
inet | IPv4 �� IPv6 ȣ��Ʈ �ּ� | |
integer | int, int4 | ��ȣ �ִ� 4����Ʈ ������ |
interval [ fields ] [ (p) ] | �ð� ���� | |
line | ��� �� ���� ���� | |
lseg | ��� �� ���� | |
macaddr | MAC (��ü ���� ����) �ּ� | |
money | ȭ���� | |
numeric [ (p, s) ] | decimal [ (p, s) ] | ���е� ���� ������ ������ |
path | ��� �� �������� ��� | |
point | ��� �� �������� ��ġ | |
polygon | ��� �� �������� ���� ��� | |
real | float4 | �ε��Ҽ��� (4 ����Ʈ) |
smallint | int2 | ��ȣ�ִ� 2����Ʈ ������ |
serial | serial4 | �ڵ� ���� 4����Ʈ ������ |
text | ���� ���� ���ڿ� | |
time [ (p) ] [ without time zone ] | �ð� (�����ð��� ����) | |
time [ (p) ] with time zone | timetz | �����ð��� ������ �ð� |
timestamp [ (p) ] [ without time zone ] | ��¥�� �ð� (�����ð��� ����) | |
timestamp [ (p) ] with time zone | timestamptz | �����ð��븦 ������ ��¥�� �ð� |
tsquery | �ؽ�Ʈ �˻� ���� | |
tsvector | �ؽ�Ʈ �˻� ���� | |
txid_snapshot | �����-���� Ʈ����� ID ������ | |
uuid | ���� ���� ��� | |
xml | XML �ڷ� |
ȣȯ��: The following types (or spellings thereof) are specified by SQL: bigint, bit, bit varying, boolean, char, character varying, character, varchar, date, double precision, integer, interval, numeric, decimal, real, smallint, time (with or without time zone), timestamp (with or without time zone), xml.
Each data type has an external representation determined by its input and output functions. Many of the built-in types have obvious external formats. However, several types are either unique to PostgreSQL, such as geometric paths, or have several possible formats, such as the date and time types. Some of the input and output functions are not invertible, i.e., the result of an output function might lose accuracy when compared to the original input.