<!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">
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.  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.<br>
<br>
<a 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.  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>
  <br>
Any idea is appreciated!<br>
  </font>
  <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>
  <table border="0" cellpadding="0" cellspacing="0" width="400">
    <tbody>
      <tr>
        <td rowspan="3" align="left" height="0" valign="bottom"
 width="15"><br>
        </td>
        <td colspan="2" align="left" height="78" valign="top" width="0">
        <p class="style4">Milo van der Linden <br>
        <a moz-do-not-send="true" href="skype:milovanderlinden?add">skype:
milovanderlinden</a><br>
        <a moz-do-not-send="true" href="mailto:mlinden@zeelandnet.nl">mlinden@zeelandnet.nl</a><br>
        <a moz-do-not-send="true"
 href="mailto:milovanderlinden@gmail.com">milovanderlinden@gmail.com</a><br>
        <a moz-do-not-send="true" href="mailto:milo@3dsite.nl">milo@3dsite.nl</a><br>
        <a moz-do-not-send="true" href="http://www.3dsite.nl">http://www.3dsite.nl</a><br>
        </p>
        </td>
        <td rowspan="3" align="left" height="0" valign="top" width="15"> </td>
        <td valign="top" width="300">
        <p class="style5"><span lang="NL">De informatie in dit bericht
reflecteert mijn persoonlijke mening en niet die van een bedrijf of
instantie. Aan de informatie kunnen geen rechten worden ontleend.
Indien dit bericht onderdeel is van een forum, mailing-list of
community dan gelden automatisch de bij het betreffende medium
behorende voorwaarden.</span> <span lang="EN">The information in this
message reflects my
personal opinion and not that of a company or public body. All rights
reserved.If this message is contained in a mailing-list or community,
the rights on the medium are automatically adapted.</span></p>
        </td>
      </tr>
    </tbody>
  </table>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
  </pre>
</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 class="moz-txt-link-freetext" href="http://www.otg-nc.com">http://www.otg-nc.com</a></pre>
</body>
</html>