Delete rules - Mailing list pgsql-sql
From | Little, Douglas |
---|---|
Subject | Delete rules |
Date | |
Msg-id | 8585BA53443004458E0BAA6134C5A7FB0CB296B2@EGEXCMB01.oww.root.lcl Whole thread Raw |
Responses |
Re: Delete rules
|
List | pgsql-sql |
<div class="WordSection1"><p class="MsoNormal">Hi,<p class="MsoNormal">We’d like to give our applications truncate capability,but that would also give them drop table permission, which we don’t want them to have.<p class="MsoNormal">So,we created a truncate function that uses the definers security context.<p class="MsoNormal"> <p class="MsoNormal">Theissue is that we now have 1000’s of programs to change to use the function. A task the developers don’twant to do. <p class="MsoNormal"> <p class="MsoNormal">So, we’re investigating using a DELETE rule. I’d like to beable to rewrite an unqualified delete into a the call to the truncate function otherwise, leave it alone.<p class="MsoNormal"> <pclass="MsoNormal">But I don’t know how to access the entire sql statement for interrogation. <p class="MsoNormal">Isthere a way I can see what the statement is that’s executing and triggering the rule?<p class="MsoNormal"> <pclass="MsoNormal">Thanks<p class="MsoNormal"> <p class="MsoNormal"> <p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">DougLittle</span></b><p class="MsoNormal"><b><span style="font-size:12.0pt"> </span></b><pclass="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Sr.Data Warehouse Architect | Enterprise Data Management | OrbitzWorldwide </span><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">500 W. Madison,Suite 1000 Chicago IL 60661| Office 312.260.2588 | Fax 312.894.5164 | Cell 847-997-5741</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif""></span><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><ahref="mailto:Douglas.Little@orbitz.com" title="mailto:dlittle@orbitz.com"><b><spanstyle="color:blue">Douglas.Little@orbitz.com</span></b></a></span><b><u><span style="font-size:13.5pt;font-family:"TimesNew Roman","serif";color:blue"></span></u></b><p class="MsoNormal"> <img alt="cid:image001.jpg@01CABEC8.D4980670"border="0" height="61" id="Picture_x0020_1" src="cid:image001.jpg@01CB33E9.35FEAAF0"width="83" /> <a href="http://www.orbitz.com/" title="http://www.orbitz.com/"><spanstyle="font-size:8.0pt;font-family:"Arial","sans-serif"; color:blue">orbitz.com</span></a> <span style="color:blue">|</span> <a href="http://www.ebookers.com/" title="http://www.ebookers.com/"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:blue">ebookers.com</span></a><span style="color:blue">|</span><a href="http://www.hotelclub.com/" title="http://www.hotelclub.com/"><span style="font-size:8.0pt;font-family: "Arial","sans-serif";color:blue">hotelclub.com</span></a> <span style="color:blue">|</span> <a href="http://www.cheaptickets.com/"title="http://www.cheaptickets.com/"><span style="font-size:8.0pt;font-family: "Arial","sans-serif";color:blue">cheaptickets.com</span></a> <span style="color:blue">|</span> <a href="http://www.ratestogo.com/"title="http://www.ratestogo.com/"><span style="font-size:8.0pt;font-family: "Arial","sans-serif";color:blue">ratestogo.com</span></a><span style="color:blue"> |</span> <a href="http://www.asiahotels.com/"title="http://www.asiahotels.com/"><span style="font-size:8.0pt;font-family: "Arial","sans-serif";color:blue">asiahotels.com</span></a><p class="MsoNormal"> </div>