Re: [RFC] grants vs. inherited tables

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] grants vs. inherited tables
Date: 2012-01-03 22:52:51
Message-ID: 20120103225251.GA14815@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 02, 2012 at 12:31:13PM +0100, Dimitri Fontaine wrote:
> Marko Kreen <markokr(at)gmail(dot)com> writes:
> > I tried to generalize a function that creates partitions
> > for a table and found out it's impossible to do it for grants.
> >
> > Basically, what I want is a child table that takes it's grants
> > from parent table. IMHO quite reasonable request. But I don't
> > see a way to do it in pl/pgsql. (Writing parser in plpgsql
> > for aclitemout() output does not count.)
>
> We solved that manually in https://github.com/slardiere/PartMgr, maybe
> you will find it useful for pre-9.2 releases. See function
> partition.grant() and partition.setgrant() in part_api.sql.

Thanks, thats interesting. Here is my current state:

https://github.com/markokr/skytools/blob/master/sql/dispatch/create_partition.sql

which uses info-schema for grants, which seems nicer than
parsing, but still not as nice as "including all".

--
marko

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2012-01-03 23:00:15 Re: 16-bit page checksums for 9.2
Previous Message Kevin Grittner 2012-01-03 22:21:42 Re: 16-bit page checksums for 9.2