장 8. �ڷ���

차례
8.1. Numeric Types
8.1.1. Integer Types
8.1.2. Arbitrary Precision Numbers
8.1.3. Floating-Point Types
8.1.4. Serial Types
8.2. Monetary Types
8.3. ���� �ڷ���
8.4. Binary Data Types
8.5. Date/Time Types
8.5.1. Date/Time Input
8.5.2. Date/Time Output
8.5.3. Time Zones
8.5.4. Interval Input
8.5.5. Interval Output
8.5.6. Internals
8.6. Boolean Type
8.7. Enumerated Types
8.7.1. Declaration of Enumerated Types
8.7.2. Ordering
8.7.3. Type Safety
8.7.4. Implementation Details
8.8. Geometric Types
8.8.1. Points
8.8.2. Line Segments
8.8.3. Boxes
8.8.4. Paths
8.8.5. Polygons
8.8.6. Circles
8.9. Network Address Types
8.9.1. inet
8.9.2. cidr
8.9.3. inet vs. cidr
8.9.4. macaddr
8.10. ��Ʈ ���ڿ� �ڷ���
8.11. Text Search Types
8.11.1. tsvector
8.11.2. tsquery
8.12. UUID Type
8.13. XML Type
8.13.1. Creating XML Values
8.13.2. Encoding Handling
8.13.3. Accessing XML Values
8.14. Arrays
8.14.1. Declaration of Array Types
8.14.2. Array Value Input
8.14.3. Accessing Arrays
8.14.4. Modifying Arrays
8.14.5. Searching in Arrays
8.14.6. Array Input and Output Syntax
8.15. Composite Types
8.15.1. Declaration of Composite Types
8.15.2. Composite Value Input
8.15.3. Accessing Composite Types
8.15.4. Modifying Composite Types
8.15.5. Composite Type Input and Output Syntax
8.16. Object Identifier Types
8.17. Pseudo-Types

PostgreSQL������ ����ڵ��� �� �� �ִ� ���� �⺻ �ڷ����� �����ϰ� �ִ�. ����, CREATE TYPE ������ �̿��ؼ� ���ο� �ڷ����� ���� ����� ����� �� �ִ�.

PostgreSQL���� �⺻������ �����ϴ� ��� ���� ���� �ڷ����� 표 8-1 ��ϰ� ����. "��Ī" Į���� ������ ��ü �̸����� ��κ��� PostgreSQL �������� ������ ���������� ���Ǵ� �͵��̴�. ���ٿ�, ���������θ� ����ϴ� ���̰ų�, �� �̻� ������ ���� �� �ڷ����鵵 ������, �װ͵��� ���⼭ �������� �ʴ´�.

표 8-1. �ڷ���

�̸���Ī����
bigintint8��ȣ �ִ� 8����Ʈ ������
bigserialserial8�ڵ� ���� 8����Ʈ ������
bit [ (n) ] ���� ���� ��Ʈ ���ڿ�
bit varying [ (n) ]varbit���� ���� ��Ʈ ���ڿ�
booleanbool���� �Ҹ��� (��/����)
box ��� �� �����簢��
bytea �����ڷ� ("����Ʈ �迭")
character varying [ (n) ]varchar [ (n) ]���� ���� ���ڿ�
character [ (n) ]char [ (n) ]���� ���� ���ڿ�
cidr IPv4 �Ǵ� IPv6 ��Ʈ��ũ �ּ�
circle ��� �� ��
date �޷� ��¥ (��, ��, ��)
double precisionfloat82�� ���� �ε� �Ҽ��� (8 ����Ʈ)
inet IPv4 �� IPv6 ȣ��Ʈ �ּ�
integerint, int4��ȣ �ִ� 4����Ʈ ������
interval [ fields ] [ (p) ] �ð� ����
line ��� �� ���� ����
lseg ��� �� ����
macaddr MAC (��ü ���� ����) �ּ�
money ȭ����
numeric [ (p, s) ]decimal [ (p, s) ]���е� ���� ������ ������
path ��� �� �������� ���
point ��� �� �������� ��ġ
polygon ��� �� �������� ���� ���
realfloat4�ε��Ҽ��� (4 ����Ʈ)
smallintint2��ȣ�ִ� 2����Ʈ ������
serialserial4�ڵ� ���� 4����Ʈ ������
text ���� ���� ���ڿ�
time [ (p) ] [ without time zone ] �ð� (�����ð��� ����)
time [ (p) ] with time zonetimetz�����ð��� ������ �ð�
timestamp [ (p) ] [ without time zone ] ��¥�� �ð� (�����ð��� ����)
timestamp [ (p) ] with time zonetimestamptz�����ð��븦 ������ ��¥�� �ð�
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.