Re: ACL-related adt functions: aclcontains vs aclcheck

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: fche(at)redhat(dot)com (Frank Ch(dot) Eigler)
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ACL-related adt functions: aclcontains vs aclcheck
Date: 2001-11-07 21:26:05
Message-ID: 6600.1005168365@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

fche(at)redhat(dot)com (Frank Ch. Eigler) writes:
> Is there a good reason why the aclcontains() UDF in utils/adt/acl.c is
> defined as it is, instead of calling over to aclcheck() in
> catalog/aclchk.c?

Backwards compatibility?

> With that, aclcontains('{"group foo=r"}',"user bar=r")
> would return true if bar is in foo.

I suspect what you are really after is a function that tests "is
privilege x available to user y given this ACL?" That would be a
good thing to have, but I'd say make a new function for it; don't
arbitrarily redefine old functions, no matter how useless you might
think they are as-is.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Buttafuoco 2001-11-07 21:43:43 Re: Storage Location Patch Proposal for V7.3
Previous Message Frank Ch. Eigler 2001-11-07 20:45:43 ACL-related adt functions: aclcontains vs aclcheck