From: Richard Huxton <dev@archonet.com>
To: Norbert Schollum <schollum@equinux.de>
To: pgsql-sql@postgresql.org
Subject: Re: Functions and Triggers
Date: Mon, 26 Mar 2001 13:04:41 +0100
Message-ID: <005f01c0b5ec$f2515660$1001a8c0@archonet.com> (raw)
References: <3ABF0AD3.9F117AAF@equinux.de>
From: "Norbert Schollum" <schollum@equinux.de>
To: <pgsql-sql@postgresql.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, schollum@equinux.de
Subject: Re: Functions and Triggers
In-Reply-To: <005f01c0b5ec$f2515660$1001a8c0@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox