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

Re: pgsql: Update for roles: < * Prevent default re-use of sysids for

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Bruce Momjian <momjian(at)svr1(dot)postgresql(dot)org>,pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Update for roles: < * Prevent default re-use of sysids for
Date: 2005-07-01 17:40:12
Message-ID: 20050701174012.GE24207@ns.snowman.net (view raw or flat)
Thread:
Lists: pgsql-committers
* Bruce Momjian (pgman(at)candle(dot)pha(dot)pa(dot)us) wrote:
> The problem is this used in pg_dumpall --clean:
> 
> 	DELETE FROM pg_shadow WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template0');

Oh, wow.  Hrmm.  That certainly won't work now.  It seems to me that the
correct thing to do here would be to loop through the roles and delete
them one-by-one, with cascade?  I think that would clean things out
correctly.  Alternatively I suppose you could delete from pg_authid and
pg_auth_members..  That seems a little ugly to me.

	Thanks,

		Stephen

In response to

pgsql-committers by date

Next:From: Bruce MomjianDate: 2005-07-01 17:40:29
Subject: pgsql: Clarify code to double \\ and '.
Previous:From: Bruce MomjianDate: 2005-07-01 17:35:22
Subject: pgsql: Clarify: < o Replace crude DELETE FROM method of pg_dumpall for

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