티스토리 뷰

반응형

SQL을 시작하기 위해서는 여러가지

익혀야 할 것들이 많지만 그 중에서도

기본적인 것을 이야기 하자면

자료형이 빠질 수 없다.

오늘은 PG-SQL의 주요 데이터 타입들을

설명해 보도록 하겠다.

사용되는 표, 이미지 등 자료의 출처는

http://www.postgresql.org 

이다.
 
 
Name Aliases Description
bigint int8 signed eight-byte integer
bigserial serial8 autoincrementing eight-byte integer
bit [ (n) ]   fixed-length bit string
bit varying [ (n) ] varbit variable-length bit string
boolean bool logical Boolean (true/false)
box   rectangular box in the plane
bytea   binary data ("byte array")
character varying [ (n) ] varchar [ (n) ] variable-length character string
character [ (n) ] char [ (n) ] fixed-length character string
cidr   IPv4 or IPv6 network address
circle   circle in the plane
date   calendar date (year, month, day)
double precision float8 double precision floating-point number
inet   IPv4 or IPv6 host address
integer int, int4 signed four-byte integer
interval [ (p) ]   time span
line   infinite line in the plane
lseg   line segment in the plane
macaddr   MAC address
money   currency amount
numeric [ (p, s) ] decimal [ (p, s) ] exact numeric of selectable precision
path   geometric path in the plane
point   geometric point in the plane
polygon   closed geometric path in the plane
real float4 single precision floating-point number
smallint int2 signed two-byte integer
serial serial4 autoincrementing four-byte integer
text   variable-length character string
time [ (p) ] [ without time zone ]   time of day
time [ (p) ] with time zone timetz time of day, including time zone
timestamp [ (p) ] [ without time zone ]   date and time
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
uuid   universally unique identifier
xml   XML data

(pg-sql의 주요 데이터 타입)





위의 표는 pg-sql 공식 홈페이지의 메뉴얼에 나와 있는 데이터 타입 표이다.

아래는 위의 표를 나름 한국어로 번역한 내용이다.

번역시 원래의 내용과 달라질 우려가 있는 항목과

굳이 번역을 해야되나...싶은 항목과

도저히 번역을 어떻게 해야할 지 모르겠는 경우.....orz.....

.
.
.
.


영문 그대로 놔 두었다.(아놔.. 나보고 어쩌라고....)



Name Aliases Description
bigint int8 음수표현가능 8바이트 integer
bigserial serial8 양수 자동증가 8바이트 integer
bit [ (n) ]   길이고정형 bit 단위 글자
bit varying [ (n) ] varbit 길이가변형 bit 단위 글자
boolean bool 논리적 불린형 (true/false)
box   rectangular box in the plane
bytea   이진 데이터 ("byte array")
character varying [ (n) ] varchar [ (n) ] 길이가변형 문자열
character [ (n) ] char [ (n) ] 길이고정형 문자열
cidr   IPv4 또는 IPv6 네트워크주소
circle   circle in the plane
date   날짜형식 (year, month, day)
double precision float8 double precision floating-point number
inet   IPv4 or IPv6 호스트 주소
integer int, int4 음수표현가능 4 바이트 integer
interval [ (p) ]   time span
line   infinite line in the plane
lseg   line segment in the plane
macaddr   MAC address
money   통화(각종 금액 단위)
numeric [ (p, s) ] decimal [ (p, s) ] exact numeric of selectable precision
path   geometric path in the plane
point   geometric point in the plane
polygon   closed geometric path in the plane
real float4 single precision floating-point number
smallint int2 음수표현가능 2바이트 integer
serial serial4 자동증가형 4바이트 integer
text   길이 가변형 문자열
time [ (p) ] [ without time zone ]   time of day
time [ (p) ] with time zone timetz time of day, including time zone
timestamp [ (p) ] [ without time zone ]   date and time
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
uuid   universally unique identifier
xml   XML data



뭐.... 여기까지 대충 번역 해 보았으나.... 안하느니 못한거 같기도 하고.....

아무튼 굳이 번역을 하지 않는 편이 더 이해를 도와준다고나 할까...

에라이.... 별 도움도 안되는....쩝...

그럼 다음번에는 정식으로 데이터형을 이용한 테이블 만들기에 도전해 보기로 한다.


 - 끗 -









 
 
 
 
 





 


반응형
댓글
반응형
06-01 14:33
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/06   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
글 보관함