From: rk Date: Fri, 29 Mar 2002 19:00:43 +0000 (+0000) Subject: postgres user rights update X-Git-Tag: prexmlproducerconfig~192 X-Git-Url: http://erislabs.net/gitweb/?p=mir.git;a=commitdiff_plain;h=fb950d3df2e094b36008e942f86ee4c0694fb013 postgres user rights update --- diff --git a/doc/INSTALL.postgresql b/doc/INSTALL.postgresql index 061d471f..7311d298 100755 --- a/doc/INSTALL.postgresql +++ b/doc/INSTALL.postgresql @@ -84,6 +84,12 @@ change to the start-scripts folder in the contrib-part. /usr/local/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test +8a. Postgresql user + + See INSTALL.mir for basic dealing with postgresql user. + Use 'createdb -U postgres' to create a Database. Create + tables with different User inside the Database. + Fine! - now you can continue with the postgresql-section in INSTALL.mir Good luck. diff --git a/doc/MAINTENANCE b/doc/MAINTENANCE index 907411a1..1f0c387b 100755 --- a/doc/MAINTENANCE +++ b/doc/MAINTENANCE @@ -15,3 +15,26 @@ be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE We also have misc. perl scripts to merge Large Objects from other DB's. these can be used as a basis to write your own custom scripts. + + +USER MANAGMENT IN POSTGRESQL + +-- set owner of datbase +select * from pg_database; +select * from pg_user; +update pg_database set datdba=ID_FROM_PG_USER where datname=DATABASENAME + +-- find all tables to grant privs / select is just building sql +-- to be exectued + +select 'grant all on '||relname||' to "de_indy";' +from pg_class +where relname not like 'pg%' +order by relname; + +-- alter table owner / select is just building sql +-- to be exectued +select 'alter table '||relname||' owner to "de_indy";' +from pg_class +where relname not like 'pg%' +order by relname; \ No newline at end of file