Skip site navigation (1) Skip section navigation (2)

Re: [repost] trigger update time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 13:10:32
Message-ID: 3623.1024492232@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Rory Campbell-Lange <rory(at)campbell-lange(dot)net> writes:
> CREATE FUNCTION "fnTU" () RETURNS opaque AS 'BEGIN
> UPDATE a SET tstamp = new.tstamp;
                                  ^ remove this semicolon
> WHERE new.a_id = id;
> RETURN new;
> END' LANGUAGE 'plpgsql';

Depending on your PG version you might also need to add a semicolon
after END.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Rory Campbell-LangeDate: 2002-06-19 14:00:59
Subject: Re: [repost] trigger update time
Previous:From: Manfred KoizarDate: 2002-06-19 12:00:26
Subject: Re: [repost] trigger update time

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group