Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 40DE2476120 for ; Wed, 29 Jan 2003 10:57:35 -0500 (EST) Received: from mta4.snet.net (mta4.snet.net [204.60.203.76]) by postgresql.org (Postfix) with ESMTP id B3F0B476E48 for ; Wed, 29 Jan 2003 10:55:11 -0500 (EST) Received: from pop.snet.net (pop.snet.net [204.60.203.72]) by mta4.snet.net (8.12.3/8.12.3/SNET-mx-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id h0TFsZGq019237; Wed, 29 Jan 2003 10:54:36 -0500 (EST) X-Originating-IP: [64.252.95.167] X-SBCIS-MTA: [pop.snet.net] Received: from monet (167.95.252.64.snet.net [64.252.95.167]) by pop.snet.net (8.12.3/8.12.3/SNET-pop-1.2/D-1.1.1.1/O-1.1.1.1) with SMTP id h0TFt5IR017133; Wed, 29 Jan 2003 10:55:05 -0500 (EST) Message-ID: <004501c2c7ae$e09ce210$5301a8c0@monet> From: "Wei Weng" To: "Tony Simbine" , References: <3E37D737.90902@mvweb.de> Subject: Re: help: triggers Date: Wed, 29 Jan 2003 10:55:42 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/487 X-Sequence-Number: 11352 It would be better if you could provide the source of that trigger and involved table schemas? Wei ----- Original Message ----- From: "Tony Simbine" To: Sent: Wednesday, January 29, 2003 8:29 AM Subject: [SQL] help: triggers > hello, > > I'm trying to update a columm on a table with a trigger > but it don't work on PostgreSQL 7.2 (i686-pc-linux-gnu, compiled by GCC > 2.96). > > when I update a row the trigger does nothing. > what can I do? > > thanks in advance > > tony > > > here is my trigger: > > ######################################################## > CREATE FUNCTION update_my_objekt() RETURNS OPAQUE AS ' > BEGIN > RAISE NOTICE ''My Trigger is updating the table''; > IF OLD.status=''Activo'' THEN > NEW.tempo := 10; > NEW.actual := now(); > END IF; > RETURN NEW; > END; > ' LANGUAGE 'plpgsql'; > > > CREATE TRIGGER update_online BEFORE UPDATE ON iobjects > FOR EACH ROW EXECUTE PROCEDURE update_my_objekt(); > > ########################################################## > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html >