From e40d3b59402c26e421a23156f217b4349a30e105 Mon Sep 17 00:00:00 2001 From: Kaimbacher Date: Fri, 1 Jul 2022 08:57:27 +0000 Subject: [PATCH] Update 'Install_PostgreSQL_14_and_PostGIS_3' --- Install_PostgreSQL_14_and_PostGIS_3.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Install_PostgreSQL_14_and_PostGIS_3.md b/Install_PostgreSQL_14_and_PostGIS_3.md index 7af013a..3630693 100644 --- a/Install_PostgreSQL_14_and_PostGIS_3.md +++ b/Install_PostgreSQL_14_and_PostGIS_3.md @@ -85,30 +85,31 @@ exit psql:\ and re-login into gn_db:\ `postgres@geomon:~$psql -d gn_db -U postgres -p 5432` -create a schema 'gba' for all gn_db tabels with full authorization for the user 'gn_admin':\ -`gn_db=# CREATE SCHEMA IF NOT EXISTS gba AUTHORIZATION gn_admin;` +change owner of schema 'public' to user 'gn_admin' for full authorization: \ +`ALTER SCHEMA public OWNER TO gn_admin;` + > CREATE SCHEMA ### Change user privileges: -> grant select, insert, update and delete privileges for the user 'gn_app':\ -`gn_db=# grant usage on schema gba to gn_app;` +`gn_db=# grant usage on schema public to gn_app;` > GRANT -`gn_db=# grant select, insert, update, delete on all tables in schema gba to gn_app;` +`gn_db=# grant select, insert, update, delete on all tables in schema public to gn_app;` > GRANT **Default "select, insert, update, delete privileges" on tables to sos_app**\ -`gn_db=# alter default privileges for role gn_admin in schema gba grant select, insert, update, delete on tables to gn_app;` +`gn_db=# alter default privileges for role gn_admin in schema public grant select, insert, update, delete on tables to gn_app;` > ALTER DEFAULT PRIVILEGES **Default usage privileges on sequences to sos_app**\ -grant usage on all sequences in schema gba to sos_app:\ -`gn_db=# alter default privileges for role gn_admin in schema gba grant usage on sequences to gn_app;` +grant usage on all sequences in schema public to sos_app:\ +`gn_db=# alter default privileges for role gn_admin in schema public grant usage on sequences to gn_app;` > ALTER DEFAULT PRIVILEGES **Default execute privileges on function to sos_app**\ -grant execute on all functions in schema gba to sos_app:\ -`alter default privileges for role gn_admin in schema gba grant execute on functions to gn_app;` +grant execute on all functions in schema public to sos_app:\ +`alter default privileges for role gn_admin in schema public grant execute on functions to gn_app;` > ALTER DEFAULT PRIVILEGES ### Create extensions: