X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 368D99FB2C3 for ; Fri, 4 Aug 2006 09:49:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 19970-01 for ; Fri, 4 Aug 2006 12:49:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id E9BCA9FB2BF for ; Fri, 4 Aug 2006 09:49:09 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 4767F738F8; Fri, 4 Aug 2006 13:49:07 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id D01BE4DB33; Fri, 4 Aug 2006 13:49:06 +0100 (BST) Message-ID: <44D34242.6000901@archonet.com> Date: Fri, 04 Aug 2006 13:49:06 +0100 From: Richard Huxton User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: David Garamond Cc: pgsql-sql@postgresql.org Subject: Re: autoupdating mtime column References: <7c33d060608040516n799af906sf74e1c645a47caff@mail.gmail.com> In-Reply-To: <7c33d060608040516n799af906sf74e1c645a47caff@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/34 X-Sequence-Number: 25992 David Garamond wrote: > Dear all, > > Please see SQL below. I'm already satisfied with everything except I > wish in > #4, mtime got automatically updated to NOW() if not explicitly SET in > UPDATE > statement. Is there a way to make the mtime column behave more like I > wanted? Thanks in advance. Just check for OLD.mtime = NEW.mtime, or am I missing something here? -- Richard Huxton Archonet Ltd