I've established a read-only collective account (sort of guest) with
no privileges. Nevertheless, the collective user in question can still
ALTER USER guest SET parameter TO value
and so change the default setting of any user-alterable run-time
Naturally, I'd like to prevent it - but there seems to be no privilege
that I could revoke from that collective user in order to disable his
changing default values of run-time configuration variables.
(The NOCREATEUSER option used when creating the collective user does
prevent it from changing its own password via
ALTER USER guest WITH ... PASSWORD ...
- which is good but not enough.)
I've tried to prevent changes to the field pg_shadow.useconfig of the
row pertaining to the collective user through
CREATE OR REPLACE RULE pg_shadow_update_rule AS ON UPDATE TO pg_shadow
WHERE NEW.usename = 'guest'
DO INSTEAD NOTHING
This trick didn't work. (I had little hope for its success from the
beginning, as the table pg_shadow doesn't belong to any database, so
I didn't expect the rule mechanism to work for it. I was connected to
database template1 as user postgres when issuing the above CREATE OR
REPLACE RULE command, if it's of any relevance.)
Is there any way I could achieve my goal?
With thanks in advance,
Alex Gutman, grateful PostgreSQL user since 1998
pgsql-admin by date
|Next:||From: Marcin Giedz||Date: 2005-02-24 13:54:46|
|Subject: Configuration for my server|
|Previous:||From: Bjoern Metzdorf||Date: 2005-02-24 07:41:53|
|Subject: Re: invalid multibyte character for locale|