Received: from www-uk-05.digiserve.com ([195.97.231.11]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2QCYWw93840 for ; Mon, 26 Mar 2001 07:34:36 -0500 (EST) (envelope-from dev@archonet.com) Received: from mainbox.archonet.com (mwynhau.demon.co.uk [193.237.186.96]) by www-uk-05.digiserve.com (8.9.1/8.9.1) with ESMTP id NAA01090; Mon, 26 Mar 2001 13:35:22 +0100 (BST) Received: from client (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id D5D4B2A686; Mon, 26 Mar 2001 13:04:45 +0100 (BST) Message-ID: <005f01c0b5ec$f2515660$1001a8c0@archonet.com> From: "Richard Huxton" To: "Norbert Schollum" , References: <3ABF0AD3.9F117AAF@equinux.de> Subject: Re: Functions and Triggers Date: Mon, 26 Mar 2001 13:04:41 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200103/519 X-Sequence-Number: 2189 From: "Norbert Schollum" To: 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