Re: [HACKERS] Re: [PATCHES] NO-CREATE-TABLE and NO-LOCK-TABLE

From: Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
To: Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Re: [PATCHES] NO-CREATE-TABLE and NO-LOCK-TABLE
Date: 2000-02-29 16:48:33
Message-ID: Pine.GSO.4.02A.10002291738410.18993-100000@Rama.DoCS.UU.SE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 29 Feb 2000, Karel Zak - Zakkr wrote:

> On Tue, 29 Feb 2000, Thomas Lockhart wrote:

(I didn't get this email, but anyway ...)

> > The current acl storage scheme flattens the acl info into a single
> > string, with a special character ("=" as I recall) to delimit the
> > user/group name from the permissions. But by quoting the user name, it
> > is possible to create a user name which contains an equals sign,
> > screwing up the acl handling.

Try creating a user "group xxx" ...

> > If you are redoing the acls, a good first step is to fix this, perhaps
> > by recoding the acl field into a structure with at least two fields
> > for username and permissions.

This was precisely the idea. Everything else should fall in place more
easily after that.

> My acl idea:

> reloid | user_insert | group_insert | user_delete ..........etc
> ---------------------------------------------------------
> 12345 | {"karel", "peter"} | {"group1"} | {"karel"} ..........etc

This still has arrays. (shudder) Try getting the information 'Does Peter
have access to x?' out of that. I was thinking along the lines of

create table pg_privilege/pg_acl/? (
objoid oid, -- not only reloid, but types, functions, etc.
userid int,
privilege char, -- maybe 'U' update, 'I' insert, etc.
grant_option bool
)

To be extended to cover column access as well. (Might have to be yet
another table.) Mathematically, this will be slower (especially since you
can't use SysCache on composite keys(???)) but similar schemas are
employed throughout by triggers etc.

> ...as I said: is the current acl/account schema good?

The SCHEME is good. The SCHEMA isn't.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-02-29 17:19:02 Re: [HACKERS] Re: [SQL] prob with aggregate and group by - returns multiplesh
Previous Message Thomas Lockhart 2000-02-29 16:39:52 Re: [HACKERS] Re: NOT {NULL|DEFERRABLE} (was: bug in 7.0)