<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello list!<br>
<br>
Thanks Guido en Chander for taking the time to respond!<br>
<br>
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!<br>
<br>
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!<br>
<br>
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!<br>
<br>
Thank you both!<br>
<br>
Kind regards,<br>
<br>
Milo van der Linden<br>
<br>
<br>
<br>
<br>
<br>
<br>
Chander Ganesan schreef:
<blockquote cite="mid:472F1D0E.9030004@otg-nc.com" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Milo van der Linden wrote:
  <blockquote cite="mid:472F0459.3050406@zeelandnet.nl" type="cite"><font
 face="Helvetica, Arial, sans-serif">Hello list,<br>
    <br>
I have a construction where a central table is updated based upon user
action in a specific user table.<br>
    <br>
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.<br>
    </font></blockquote>
I think you should look at the SECURITY DEFINER settings for Stored
Procedures and triggers.&nbsp; You can create the trigger so it runs with
permissions that differ from the user that is updating the table.&nbsp; Thus
the trigger would have rights on the table being selected and updated,
but the user would not have those rights.<br>
  <br>
  <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.postgresql.org/docs/techdocs.77">http://www.postgresql.org/docs/techdocs.77</a><br>
  <br>
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.&nbsp; Make
sure they either set their own search path, or that they specify a
schema when using or referencing objects.<br>
  <br>
Chander<br>
  <blockquote cite="mid:472F0459.3050406@zeelandnet.nl" type="cite"><font
 face="Helvetica, Arial, sans-serif"><br>
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!<br>
    </font></blockquote>
  <br>
  <br>
  <pre class="moz-signature" cols="72">-- 
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC  27560
919-463-0999/877-258-8987
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.otg-nc.com">http://www.otg-nc.com</a></pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<title>3DSite</title>
<meta http-equiv="Content-Type" content="text/html; ">
<style type="text/css">
<!--
body {
        background-color: #FFFFFF;
        margin-left: 5px;
        margin-top: 5px;
        margin-right: 5px;
        margin-bottom: 5px;
}
body,td,th {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        color: #333333;
}
.style4 {font-size: 9px; }
.style5 {font-size: 9px; color: #CCCCCC; }
-->
</style>
<meta content="MSHTML 6.00.2900.2912" name="GENERATOR">
<br>
<br>
</div>
</body>
</html>