PostgreSQL 도 Oracle 과 같은 타디비 처럼 primary key 생성시
해당 컬럼에 대해서 자동으로 인덱스가 생성됩니다.
확인해볼까요?
scottb=> create table test(col1 integer primary key);
CREATE TABLE
scottdb=> \d test
"public.test" 테이블
필드명 | 형태 | 기타 조건
--------+---------+-----------
col1 | integer | not null
인덱스들:
"test_pkey" PRIMARY KEY, btree (col1)