| From: | Stephen Frost <sfrost(at)snowman(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: LOCK TABLE Permissions |
| Date: | 2015-05-11 19:45:01 |
| Message-ID: | 20150511194501.GD30322@tamriel.snowman.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
All,
* Stephen Frost (sfrost(at)snowman(dot)net) wrote:
> * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> > Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > > if (lockmode == AccessShareLock)
> > > aclresult = pg_class_aclcheck(reloid, GetUserId(),
> > > ACL_SELECT);
> > > + else if (lockmode == RowExclusiveLock)
> > > + aclresult = pg_class_aclcheck(reloid, GetUserId(),
> > > + ACL_INSERT | ACL_UPDATE | ACL_DELETE | ACL_TRUNCATE);
> > > else
> > > aclresult = pg_class_aclcheck(reloid, GetUserId(),
> > > ACL_UPDATE | ACL_DELETE | ACL_TRUNCATE);
> >
> > Perhaps it would be better to refactor with a local variable for the
> > aclmask and just one instance of the pg_class_aclcheck call. Also, I'm
> > pretty sure that the documentation work needed is more extensive
> > than the actual patch ;-). Otherwise, I don't see a problem with this.
>
> Now for a blast from the past... This came up again on IRC recently and
> reminded me that I ran into the same issue a couple years back. Updated
> patch includes the refactoring suggested and includes documentation.
>
> Not going to be back-patched, as discussed with Robert.
>
> Barring objections, I'll push this later today.
Done, finally.
Thanks!
Stephen
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2015-05-11 19:52:03 | Re: LOCK TABLE Permissions |
| Previous Message | David Steele | 2015-05-11 19:38:30 | Re: deparsing utility commands |