program

[postgreSql]

꿀항아리_ 2013. 11. 20. 15:14
반응형

1. 유저생성

   create user [User] with password '[1234]' createdb; 


2. 유저권한변경

  alter user [User] WITH CREATEDB CREATEUSER; 

 


3. 필드추가

   alter table [tableName] add columnName [TYPE];



4. 기본 키 재생성(remove and create)

   alter table [tableName] drop constraint [constraint];

   alter table [tableName] add constraint [constraint] primary key ([filed], [filed]);


4. PostgreSQL UTF8 설정

Windows 

    Location : ~postgresql/[version]/data/postgresql.conf


Linux

Location :  /usr/local/pgsql/data/postgresql.conf


 ......

 #client_encoding = utf8

......





반응형