Re: Functions and Triggers

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Norbert Schollum" <schollum(at)equinux(dot)de>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Functions and Triggers
Date: 2001-03-26 12:04:41
Message-ID: 005f01c0b5ec$f2515660$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

From: "Norbert Schollum" <schollum(at)equinux(dot)de>
To: <pgsql-sql(at)postgresql(dot)org>
Sent: Monday, March 26, 2001 10:24 AM
Subject: [SQL] Functions and Triggers

> Hello there!
>
> here is what i want to realize:
>
> a trigger, that puts a now() in the last_updated field, on any update of
> that table.
>
> i read the manual but i wasnt able to make a working function.
> what is the return value here? is there any or is it void?

"opaque" - a special value for triggers.

> has somebody a example for me that is similary to my problem?

Yep - see the postgres notes from techdocs.postgresql.org - I've got an
example there of exactly this (it's in the "automating" chapter - sorry,
forget the precise URL)

Also have a look at the Cookbook (linked to from same place) which might
well have more examples.

- Richard Huxton

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2001-03-26 12:23:15 Re: Still don't know how to build this string ?
Previous Message juerg.rietmann 2001-03-26 10:12:54 Still don't know how to build this string ?