edb=# create user test identified by test;
CREATE ROLE
edb=# grant connect on database edb to test;
GRANT
edb=# grant usage on schema public to test;
GRANT
edb=# create table t(c1 char(10));
CREATE TABLE
edb=# insert into t values('DEB');
INSERT 0 1
edb=# commit;
COMMIT
edb=# grant select,insert on emp to test;
GRANT
edb=# \c edb test;
Password for user test:
You are now connected to database "edb" as user "test".
edb=> select * from emp;
empno | ename | job | mgr | hiredate | sal | comm | de
ptno
-------+--------+-----------+------+--------------------+---------+---------+---
-----
7369 | SMITH | CLERK | 7902 | 17-DEC-80 00:00:00 | 800.00 | |
20
Related
0 comments on “PostgreSQL DBA part 5 :- Create user and grant privilege in postgresql”
SildГ©nafil 100mg pharmacie en ligne Viagra sans ordonnance 24h Viagra sans ordonnance livraison 24h