From: | Maciej Sieczka <tutey(at)o2(dot)pl> |
---|---|
To: | "Obe, Regina" <robe(dot)dnd(at)cityofboston(dot)gov> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: how to auto GRANT rights on a new table? |
Date: | 2008-02-23 14:50:16 |
Message-ID: | 47C032A8.2020509@o2.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Obe, Regina pisze:
> I had posted this earlier to postgis group, but apparently it didn't
> go thru.
It seems so. My further posts there didn't go through either.
> I take it that you have no control over how these people are creating
> tables. e.g they are not creating it via some custom application of
> yours where the solution would be obvious.
These are PostGIS tables created with QGIS Python plugin, which I could
modify to set desired ACL, if there's no other way. However, there are
also non-spatial tables created with OO.org Base, of which I don't have
that control. Moreover, other client software creating tables in future
might come to play. Thus, it would be most robust to solve the issue on
the server side, not to have to manage the software on the client side
in this regard at all.
> Unfortunately you can't put a trigger on pg_tables because that is
> not a table but a read-only view.
I see. How about a trigger on pg_class table directly? Would it be doable?
> The way I usually handle this issue is to just have a plpgsql stored
> function that gets called by some hourly process running that grants
> permissions to tables that don't already have them. e.g. using
> something like pgAgent or crontab. Your function would look
> something like
Thank you very much for your example. I'd still prefer a solution which
sets ACL instantly when the table is created though. Really no way?
Maciek
From | Date | Subject | |
---|---|---|---|
Next Message | Mag Gam | 2008-02-24 20:57:31 | Logging Question |
Previous Message | Raimon Fernandez | 2008-02-23 07:05:15 | Re: Sequences, defaults and getting a new key |