Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3437C475EAD for ; Tue, 20 Aug 2002 17:16:12 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id BE9B0475EA3 for ; Tue, 20 Aug 2002 17:16:11 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 4CFDBD617; Tue, 20 Aug 2002 14:16:13 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 42AFD5C04; Tue, 20 Aug 2002 14:16:13 -0700 (PDT) Date: Tue, 20 Aug 2002 14:16:13 -0700 (PDT) From: Stephan Szabo To: Martin Marques Cc: Subject: Re: functions and triggers In-Reply-To: <1029875385.3d62a6b9b2522@bugs.unl.edu.ar> Message-ID: <20020820141353.B45554-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/298 X-Sequence-Number: 9144 On Tue, 20 Aug 2002, Martin Marques wrote: > I'm trying to build a trigger that will update a timestamp field in a table with > the current timestamp, and I just can't make it work. > > The problemas are two: > > 1) when I try to create the trigger, it says that the function doesn't exist. > Why is this happening? You should probably show us what you were trying to do, but I'm going to guess that the function doesn't have the right signature. On current versions, Trigger functions should return opaque and take no arguments (any arguments given on the create trigger line are passed in a different fashion). > 2) How does the trigger tell the function the row number identifier? I'm not sure what you mean by this. Getting at the row being worked on depends somewhat on what language you're using.