Re: [repost] trigger update time

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
Cc: Postgresql Novice List <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [repost] trigger update time
Date: 2002-06-19 12:00:26
Message-ID: b5r0hucmsfn1m1maofimbi4911jtkrefv6@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, 19 Jun 2002 09:36:34 +0100, Rory Campbell-Lange
<rory(at)campbell-lange(dot)net> wrote:
>I am trying to update a timestamp value in a related table using
>functions and triggers, but failing miserably!

Rory,

timestamp is not the problem.

>CREATE FUNCTION "fnTU" () RETURNS opaque AS 'BEGIN
>UPDATE a SET tstamp = new.tstamp;
>WHERE new.a_id = id;
>RETURN new;
>END' LANGUAGE 'plpgsql';
^
Insert ; here!

Servus
Manfred

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2002-06-19 13:10:32 Re: [repost] trigger update time
Previous Message Ron Johnson 2002-06-19 10:35:38 Re: Which indexes to drop