Postgres Utenti: differenze tra le versioni
Jump to navigation
Jump to search
(Creata pagina con "==Super User== create role pgadmin with encrypted password 'XXXYYYYZZZZZ'; alter role pgadmin with login; grant all privileges on database postgres to pgadmin; alter role...") |
|||
(6 versioni intermedie di uno stesso utente non sono mostrate) | |||
Riga 1: | Riga 1: | ||
== |
==superuser== |
||
create role pgadmin with encrypted password 'XXXYYYYZZZZZ'; |
create role pgadmin with encrypted password 'XXXYYYYZZZZZ'; |
||
alter role pgadmin with login; |
alter role pgadmin with login; |
||
Riga 7: | Riga 7: | ||
alter role pgadmin with superuser; |
alter role pgadmin with superuser; |
||
==utenti sola lettura== |
|||
create group pasticcio_ro; |
|||
grant connect on database pasticci_db to pasticcio_ro; |
|||
grant usage on schema pasticci_schema to pasticcio_ro; |
|||
grant select on all tables in schema pasticci_schema to pasticcio_ro; |
|||
alter default privileges in schema pasticci_schema grant select on tables to group pasticcio_ro; |
|||
create role ciccio_pasticcio with login encrypted password 'XXXYYYYZZZZZ'; |
|||
alter group pasticcio_ro add user ciccio_pasticcio; |
|||
alter role ciccio_pasticcio set search_path='pasticci_schema'; |
|||
==utenti proprietari== |
|||
create role pasticcio_app with login encrypted password 'XXXYYYYZZZZZ'; |
|||
grant all privileges on database pasticci_db to pasticcio_app; |
|||
alter user pasticcio_app set search_path='pasticci_schema'; |
|||
[[Categoria:Database]] |
[[Categoria:Database]] |
Versione attuale delle 16:01, 26 apr 2022
superuser
create role pgadmin with encrypted password 'XXXYYYYZZZZZ'; alter role pgadmin with login; grant all privileges on database postgres to pgadmin; alter role pgadmin with createdb; alter role pgadmin with createrole; alter role pgadmin with superuser;
utenti sola lettura
create group pasticcio_ro; grant connect on database pasticci_db to pasticcio_ro; grant usage on schema pasticci_schema to pasticcio_ro; grant select on all tables in schema pasticci_schema to pasticcio_ro; alter default privileges in schema pasticci_schema grant select on tables to group pasticcio_ro;
create role ciccio_pasticcio with login encrypted password 'XXXYYYYZZZZZ'; alter group pasticcio_ro add user ciccio_pasticcio; alter role ciccio_pasticcio set search_path='pasticci_schema';
utenti proprietari
create role pasticcio_app with login encrypted password 'XXXYYYYZZZZZ'; grant all privileges on database pasticci_db to pasticcio_app; alter user pasticcio_app set search_path='pasticci_schema';