Re: functions and triggers - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: functions and triggers
Date
Msg-id 20020820141353.B45554-100000@megazone23.bigpanda.com
Whole thread Raw
In response to functions and triggers  (Martin Marques <martin@bugs.unl.edu.ar>)
Responses Re: functions and triggers  (Martin Marques <martin@bugs.unl.edu.ar>)
List pgsql-sql
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.




pgsql-sql by date:

Previous
From: Martin Marques
Date:
Subject: functions and triggers
Next
From: Martin Marques
Date:
Subject: Re: functions and triggers