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 72A54D81F4 for ; Thu, 13 Oct 2005 00:08:23 -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 16237-03 for ; Thu, 13 Oct 2005 03:08:21 +0000 (GMT) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [151.155.5.143]) by svr1.postgresql.org (Postfix) with ESMTP id C2EFBD81E1 for ; Thu, 13 Oct 2005 00:08:20 -0300 (ADT) Received: from [172.16.1.100] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.6 $ on Linux via secured & encrypted transport (TLS); Wed, 12 Oct 2005 21:08:11 -0600 In-Reply-To: <16842.1129171924@sss.pgh.pa.us> 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 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <263BB61D-9C9A-40DD-A9CA-7FD6FE40AB75@myrealbox.com> Cc: postgresql sql list , Jeff Williams Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: Update timestamp on update Date: Thu, 13 Oct 2005 12:07:47 +0900 To: Tom Lane X-Mailer: Apple Mail (2.734) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200510/125 X-Sequence-Number: 22978 On Oct 13, 2005, at 11:52 , Tom Lane wrote: > Jeff Williams writes: > >> Thanks. Triggers was my first thought, but chapter 35 on Triggers >> didn't >> really indicate a way I could do this easily and scared me with a >> lot of >> c code. >> > > Yeah. This is a documentation issue that's bothered me for awhile. > The problem is that we treat the PL languages as add-ons and therefore > 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. I think examples in PL/pgSQL would perhaps be most appropriate, as it's a PostgreSQL-specific language, arguably easy to read, and a PL that doesn't rely on any external dependencies, so it should be relatively easy for people to install it if they want. (IIRC, there's even been discussion in the past of whether or not PL/pgSQL should be installed by default.) Michael Glaesemann grzm myrealbox com