CREATE USER otheruser WITH PASSWORD 'password';


GRANT INSERT, UPDATE, DELETE ON othertable TO otheruser;

이렇게만 하면, 기존 사용자는 그대로 crud가 가능한 상태에서,
새로운 특정사용자에게 othertable 특정테이블만  권한을 주게된다. 


(확인)

SELECT grantee, privilege_type
FROM information_schema.table_privileges
WHERE table_name='mytable';

 

 

///실 사용예제.

$ psql -h dbURL -U postgres -d postgres
> \c testdb
> CREATE USER otheruser WITH PASSWORD 'test';
> GRANT INSERT, UPDATE, DELETE, SELECT ON monthlydata TO otheruser;

> \c testdb otheruser
> SELECT grantee, privilege_type
FROM information_schema.table_privileges
WHERE table_name='monthlydata'

Posted by yongary
,