X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7C1159FA60B for ; Fri, 23 Jun 2006 14:35:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 56867-10 for ; Fri, 23 Jun 2006 14:35:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 2CF359FB0D1 for ; Fri, 23 Jun 2006 14:35:11 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1Ftpei-0006A5-Bw for pgsql-sql@postgresql.org; Fri, 23 Jun 2006 13:41:20 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 8E7FA4051; Fri, 23 Jun 2006 13:35:04 -0400 (EDT) Date: Fri, 23 Jun 2006 13:35:04 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Fwd: Start up question about triggers Message-ID: <20060623173504.GC12422@phlogiston.dyndns.org> References: <006901c696c1$d2af82d0$6400a8c0@Dell4500> <200606231548.k5NFmhSW028183@auth-smtp.hol.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200606231548.k5NFmhSW028183@auth-smtp.hol.gr> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/261 X-Sequence-Number: 25497 On Fri, Jun 23, 2006 at 06:48:49PM +0300, Forums @ Existanze wrote: > > Then there exist a TG_QUERY parameter that we could use to get the actual > query ran by a user, so if I ran the imaginary query Which "actual query"? By the time the trigger fires, the query might already have been rewritten, I think. No? I _think_ that even BEFORE triggers happen after the rewriter stage is called, but someone who has more clue will be able to correct me if I'm wrong. A -- Andrew Sullivan | ajs@crankycanuck.ca Everything that happens in the world happens at some place. --Jane Jacobs