[postgis-users] is update privilige related to select?
Milo van der Linden
mlinden at zeelandnet.nl
Mon Nov 5 07:14:41 PST 2007
Hello list!
Thanks Guido en Chander for taking the time to respond!
I decided to take Chander's approach, on first hand everything works
good! I had to do some redesign on my function, but now all works well!
It looked as if something went wrong with passing keys, but it had to do
with using old. on an insert statement. The error code was a bit cryptic
from the client application, but I did it!
What I have now is a postGres database where users connect to their own
tables with qGIS (yes, a GIS application capable of editing postGIS data
directly); create and update parcels with full history recording and
updating a central table!
Thank you both!
Kind regards,
Milo van der Linden
Chander Ganesan schreef:
> Milo van der Linden wrote:
>> Hello list,
>>
>> I have a construction where a central table is updated based upon
>> user action in a specific user table.
>>
>> When the user updates a record in his own table, a trigger is fired
>> that updated the central table with an insert .... where ogc_fid = x
>> statement.
> I think you should look at the SECURITY DEFINER settings for Stored
> Procedures and triggers. You can create the trigger so it runs with
> permissions that differ from the user that is updating the table.
> Thus the trigger would have rights on the table being selected and
> updated, but the user would not have those rights.
>
> http://www.postgresql.org/docs/techdocs.77
>
> Keep in mind that when using these settings you need to make sure that
> you are careful as to how you define the triggers/procedures. Make
> sure they either set their own search path, or that they specify a
> schema when using or referencing objects.
>
> Chander
>>
>> I keep getting a "permission denied" error, even tough I granted the
>> user INSERT and UPDATE priviliges. Is it because the user has no
>> SELECT rights that the insert where fails? I don't want to give the
>> user select rights, because this would make my entire construction
>> useless!
>
>
> --
> Chander Ganesan
> Open Technology Group, Inc.
> One Copley Parkway, Suite 210
> Morrisville, NC 27560
> 919-463-0999/877-258-8987
> http://www.otg-nc.com
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071105/a4502e22/attachment.html>
More information about the postgis-users
mailing list