Skip site navigation (1) Skip section navigation (2)

Preventing changes to default settings of a collective account?

From: Alex Gutman <agutman(at)emc(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Preventing changes to default settings of a collective account?
Date: 2005-02-24 13:33:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin

I've established a read-only collective account (sort of guest) with
no privileges. Nevertheless, the collective user in question can still
issue commands

ALTER USER guest SET parameter TO value

and so change the default setting of any user-alterable run-time
configuration variable.

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


- 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'

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 GiedzDate: 2005-02-24 13:54:46
Subject: Configuration for my server
Previous:From: Bjoern MetzdorfDate: 2005-02-24 07:41:53
Subject: Re: invalid multibyte character for locale

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group