<span class="gmail_quote"></span><p>Hello.<p>I'm doing a Trigger Procedure in pl/pgSQL. It makes some kind of
auditing.<p>Ithink that it's working alright except for the next line:<p>EXECUTE 'INSERT INTO ' ||
quote_ident(somedynamictablename)|| ' SELECT new.*';<p>PostgreSQL keeps telling me: "ERROR: NEW used in query that is
notin a rule". I think that this NEW problem is because of the scope of the EXECUTE statement (outside the scope of
thetrigger), so it doesn't recognize the NEW record. <p>Maybe I could fix it concatenating column names and the 'new'
valuesbut I want to do my trigger as flexible as possible (I have several tables to audit).<p>Somebody has any
suggestion?<p>Thanksa lot,<span class="sg"><p>Javier</span>