Re: BUG #1161: User permissions are kept, even if user is - Mailing list pgsql-bugs

From Fabien COELHO
Subject Re: BUG #1161: User permissions are kept, even if user is
Date
Msg-id Pine.LNX.4.60.0406091006400.23621@sablons.cri.ensmp.fr
Whole thread Raw
In response to Re: BUG #1161: User permissions are kept, even if user is  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #1161: User permissions are kept, even if user is
List pgsql-bugs
Dear Tom,

> The "clean" way to handle this would be to extend the bootstrap command
> parser to accept a command along the lines of CREATE [SHARED] SEQUENCE
> and then add a file in src/include/catalog that defines the shared
> user-id-generator sequence.  (Look at how pg_shadow is created for
> precedent.)

Ok. I'll look into that to evaluate what is the impact.

> Not having looked recently, I have no idea how much pain is implied by
> the preceding paragraph ;-).  I'd be willing to accept cruder
> compromises if that approach seems impractical, but please look to see
> if it can be done nicely first.

Ok.

For crude stuff, I can contribute simple and efficient ideas:

I was thinking that any integer attribute of any tuple in a shared
relation would be ok to store a sequence value. There are only 3 shared
relations, pg_{database,group,shadow}. Thus, something like a speudo
"next_sysid" user/group could store the next value in the relevant shared
relations.

This approach would be light weight from the implementation point of view.
Not very clean, but that would be easy and would not change much the
catalog.

--
Fabien Coelho - coelho@cri.ensmp.fr

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1161: User permissions are kept, even if user is
Next
From: Tom Lane
Date:
Subject: Re: BUG #1161: User permissions are kept, even if user is