Re: functions and triggers

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: functions and triggers
Date: 2002-08-20 21:16:13
Message-ID: 20020820141353.B45554-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Martin Marques 2002-08-20 21:37:24 Re: functions and triggers
Previous Message Martin Marques 2002-08-20 20:29:45 functions and triggers