Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A482D2E2FFF for ; Thu, 29 Nov 2007 10:27:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 24896-08 for ; Thu, 29 Nov 2007 10:26:53 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by postgresql.org (Postfix) with ESMTP id 5CA432E009D for ; Thu, 29 Nov 2007 10:26:58 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so2470320waf for ; Thu, 29 Nov 2007 06:26:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=+Al2gtF3R59hGo2+ITjGjN7lj5NPyDuCipVjyOuDDqg=; b=vDflPkQhf1Fus5OA9AZSBHXrSAg2/+/ivsL3E1ycbW69w1MuyoFv3XVUzGUie3iSEAt5pS+1hbjZ+S6U2rIP1oY4pi5IEx749jUiVbnsvFjj/Ar5Cyv/JSvI2xISSqcBvr1PUqiFBSPsA25WMI6Yqv7m4TDKOZoVh00Ou2BdHuY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=alSvU5+S3M9iVCTrJjx6+9xbqLdrUrB8jHK+UvmaQkphVl5YalTnXTBv70yuUTuR4HbYKdL3bA5YiEoTyZ6evYNTD69kT25imW5Y0ep3DHKXeIWuzczuHCnsinSGKYDlqD872gvLbKuKIoLWQmqmh18ziv1WtgdTL64ISEej1VM= Received: by 10.115.90.1 with SMTP id s1mr679736wal.1196346414358; Thu, 29 Nov 2007 06:26:54 -0800 (PST) Received: by 10.114.193.5 with HTTP; Thu, 29 Nov 2007 06:26:54 -0800 (PST) Message-ID: <162867790711290626m105ac02fgd1a6dcab673a24d4@mail.gmail.com> Date: Thu, 29 Nov 2007 15:26:54 +0100 From: "Pavel Stehule" To: "Stephen Cook" Subject: Re: statement-level trigger sample out there? Cc: pgsql-sql@postgresql.org In-Reply-To: <474EC9CE.9090609@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071129130159.110470@gmx.net> <162867790711290548t2a050d59ta77595c2b05d59ce@mail.gmail.com> <474EC9CE.9090609@gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/155 X-Sequence-Number: 29683 On 29/11/2007, Stephen Cook wrote: > I am curious (coming from a MS SQL Server background, I just started > playing with PostgreSQL recently). yes, I belive. I was too. There are total different style of triggeres in Postgres. But If I can say, programming in Postgres is much more confortable. But It is different. You have to use ROW triggers. > > What type of situation would warrant a statement-level trigger that > can't access the old and new values? Without that access, isn't the > only information you get is the fact that an operation occurred on the > table? Or am I missing something? > > -- Stephen > Statement triggers can be used in some kind of auditing. Maybe. I didn't use it. And I use Postgres five years. Pavel > > > Pavel Stehule wrote: > > Hello > > > > You cannot to access to values in statement trigger. Postgres doesn't > > support it. > > > > Regards > > Pavel Stehule > > > > On 29/11/2007, Christian Kindler wrote: > >> Hi > >> > >> Can anyone provide me a simple example of a statement-level trigger? Problem is I do not know how to access the old.*, new.* values. > >> > >> Thanks > >> Chris > >> -- > >> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. > >> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail > >> > >> ---------------------------(end of broadcast)--------------------------- > >> TIP 1: if posting/reading through Usenet, please send an appropriate > >> subscribe-nomail command to majordomo@postgresql.org so that your > >> message can get through to the mailing list cleanly > >> > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 1: if posting/reading through Usenet, please send an appropriate > > subscribe-nomail command to majordomo@postgresql.org so that your > > message can get through to the mailing list cleanly > > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: You can help support the PostgreSQL project by donating at > > http://www.postgresql.org/about/donate >