X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E3200D7F63 for ; Thu, 13 Oct 2005 11:22:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08717-07 for ; Thu, 13 Oct 2005 14:22:48 +0000 (GMT) Received: from smtp105.rog.mail.re2.yahoo.com (smtp105.rog.mail.re2.yahoo.com [206.190.36.83]) by svr1.postgresql.org (Postfix) with SMTP id 576D0D7F1C for ; Thu, 13 Oct 2005 11:22:50 -0300 (ADT) Received: (qmail 73544 invoked from network); 13 Oct 2005 14:22:55 -0000 Received: from unknown (HELO phlogiston.dydns.org) (a.sullivan@rogers.com@209.222.54.227 with login) by smtp105.rog.mail.re2.yahoo.com with SMTP; 13 Oct 2005 14:22:54 -0000 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id F11394173; Thu, 13 Oct 2005 10:22:53 -0400 (EDT) Date: Thu, 13 Oct 2005 10:22:53 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Update timestamp on update Message-ID: <20051013142253.GB16317@phlogiston.dyndns.org> References: <434DB482.1000205@globaldial.com> <16305.1129167889@sss.pgh.pa.us> <434DC97E.7000603@globaldial.com> <16842.1129171924@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16842.1129171924@sss.pgh.pa.us> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.033 required=5 tests=[AWL=-0.017, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/137 X-Sequence-Number: 22990 On Wed, Oct 12, 2005 at 10:52:04PM -0400, Tom Lane wrote: > the documentation of the "core" system shouldn't rely on them ... but > that leaves us presenting C-code triggers as the only examples in > chapter 35. There is a paragraph in there suggesting you go look at > the PL languages first, but obviously it's not getting the job done. > > Anybody have a better idea? It could just be made a little friendlier, I think. At the beginning of the trigger chapter is this: --snip-- This chapter describes how to write trigger functions. Trigger functions can be written in C or in some of the available procedural languages. It is not currently possible to write a SQL-language trigger function. --snip-- We could just add a little note by way of modification. Here's a (somewhat verbose, I fear) suggestion: --snip-- This chapter describes how to write trigger functions. Trigger functions can be written in C or in some of the available procedural languages. This chapter deals only with functions that are written in C. If you are unfamiliar with C, you may want also to look at the chapters on procedural languages, because there are some examples there that may be easier for you to understand. To use a procedural language for a trigger, you will need to install that language; see the relevant chapter for instructions on how to do so. It is not currently possible to write a SQL-language trigger function. --snip-- A -- Andrew Sullivan | ajs@crankycanuck.ca The plural of anecdote is not data. --Roger Brinner