2011. 1. 7. 12:49
PostgreSQL - Windows 설치 후 해본 일 Work/PostgreSQL2011. 1. 7. 12:49
-- Tablespace 생성
CREATE TABLESPACE TS_WORK01 LOCATION E'E:\\PostgreSQL_DATA\\ts_work01';
CREATE TABLESPACE TS_WORK02 LOCATION E'E:\\PostgreSQL_DATA\\ts_work02';
-- Database 생성
CREATE DATABASE DB_WORK01 TABLESPACE=TS_WORK01;
CREATE DATABASE DB_WORK02 TABLESPACE=TS_WORK02;
-- USER 생성
CREATE USER kipi WITH PASSWORD 'xxxxxxxx';
-- OWNER 변경
ALTER TABLESPACE TS_WORK01 OWNER TO kipi;
ALTER TABLESPACE TS_WORK02 OWNER TO kipi;
ALTER DATABASE DB_WORK01 OWNER TO kipi;
ALTER DATABASE DB_WORK02 OWNER TO kipi;
-- 제거
DROP DATABASE DB_WORK01;
DROP DATABASE DB_WORK02;
DROP TABLESPACE TS_WORK01;
DROP TABLESPACE TS_WORK02;
DROP USER kipi;