Re: Clearing old user ids completely - Mailing list pgsql-general

From Tom Lane
Subject Re: Clearing old user ids completely
Date
Msg-id 15141.1200441292@sss.pgh.pa.us
Whole thread Raw
In response to Re: Clearing old user ids completely  (Erik Jones <erik@myemma.com>)
List pgsql-general
Erik Jones <erik@myemma.com> writes:
> You can build and EXECUTE the ALTER TABLE commands in a function of a
> few lines.  With regards to removing the faulty permissions, will
> REVOKE not work if the user doesn't exist in the system anymore (I
> honestly don't know much about pre-8.0 behaviours)?  If not take a
> look at the aclitem functions in the pg_catalog schema (in psql: \df
> *acl*), they may be what you're looking for.

Yeah, getting rid of references to the user in ACL lists is going to
be the main pain-in-the-neck here.  Ownership is relatively easy to fix
with direct updates on the catalog owner columns (and in 7.4 there's
by definition nothing behind-the-scenes in dependency tables).  I
can't think of any equally easy fix for ACL references though, because
the available SQL-level operations on aclitem arrays are pretty weak.

            regards, tom lane

pgsql-general by date:

Previous
From: Ben
Date:
Subject: autovacuum vs. createdb
Next
From: Justin Pasher
Date:
Subject: Re: Clearing old user ids completely