ALTER TABLESPACE — 테이블스페이스 정의 바꾸기
ALTER TABLESPACE이름
RENAME TO새이름
ALTER TABLESPACE이름
OWNER TO {새소유주
| CURRENT_USER | SESSION_USER } ALTER TABLESPACE이름
SET (tablespace_option
=value
[, ... ] ) ALTER TABLESPACE이름
RESET (tablespace_option
[, ... ] )
ALTER TABLESPACE
명령은 테이블스페이스
속성을 변경한다.
ALTER TABLESPACE
명령은 해당 테이블스페이스의 소유주가
실행 할 수 있다. 소유주를 변경하려면, 새 소유주로 변경할 수
있는 권한이 있어야한다.
(슈퍼유저는 자동으로 그 권한을 갖는다.)
이름
작업 대상이 되는 테이블스페이스 이름
새이름
바꿀 새 테이블스페이스 이름. 새 이름으로 pg_
로 시작하는 이름은 사용할 수 없다. 이것은 시스템 테이블스페이스로
사용된다.
새소유주
해당 테이블스페이스의 새 소유주
tablespace_option
A tablespace parameter to be set or reset. Currently, the only
available parameters are seq_page_cost
,
random_page_cost
and effective_io_concurrency
.
Setting either value for a particular tablespace will override the
planner's usual estimate of the cost of reading pages from tables in
that tablespace, as established by the configuration parameters of the
same name (see seq_page_cost,
random_page_cost,
effective_io_concurrency). This may be useful if
one tablespace is located on a disk which is faster or slower than the
remainder of the I/O subsystem.
index_space
테이블스페이스를 fast_raid
이름으로 바꾸는 명령:
ALTER TABLESPACE index_space RENAME TO fast_raid;
index_space
테이블스페이스의 소유주를 바꾸는 명령:
ALTER TABLESPACE index_space OWNER TO mary;
ALTER TABLESPACE
구문은 표준 SQL 구문에는 없다.