X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 98C8E9DCB4A for ; Mon, 6 Feb 2006 06:02:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 21136-09 for ; Mon, 6 Feb 2006 06:02:25 -0400 (AST) X-Greylist: delayed 00:18:08.634573 by SQLgrey- Received: from ibox-server.openwired.net (77.Red-213-97-52.staticIP.rima-tde.net [213.97.52.77]) by postgresql.org (Postfix) with ESMTP id 61AA49DC9A3 for ; Mon, 6 Feb 2006 06:02:21 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by ibox-server.openwired.net (Postfix) with ESMTP id 834E02E01DD for ; Mon, 6 Feb 2006 10:32:41 +0000 (GMT) Received: from ibox-server.openwired.net ([127.0.0.1]) by localhost (ibox-server.openwired.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23589-02 for ; Mon, 6 Feb 2006 10:32:39 +0000 (GMT) Received: from [10.0.0.21] (unknown [10.0.0.21]) by ibox-server.openwired.net (Postfix) with ESMTP id D016F2E01D2 for ; Mon, 6 Feb 2006 10:32:39 +0000 (GMT) Message-ID: <43E71A6C.6070104@openwired.net> Date: Mon, 06 Feb 2006 10:44:12 +0100 From: =?ISO-8859-1?Q?Josep_Sanmart=ED?= User-Agent: Mozilla Thunderbird 1.0.5 (X11/20050711) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Trigger on a column Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by I-Box de Openwired (www.openwired.com) Antivirus-Antispam at openwired.net X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.151 required=5 tests=[RCVD_IN_WHOIS_INVALID=2.151] X-Spam-Score: 2.151 X-Spam-Level: ** X-Archive-Number: 200602/44 X-Sequence-Number: 24054 Hi, My trigger's running on a table that works perfectly. This trigger calls a function that inserts or modifies a row of a different table. My problem is that I need to optimize this trigger, and the only way that I've found is to fire the trigger when certain table fields are modified. I do it like this: CREATE TRIGGER tr_barra_aps AFTER INSERT OR DELETE OR UPDATE OF status ON am_access_point EXECUTE PROCEDURE f_barra_aps(); but I get this error: ERROR: syntax error at or near "status" at character 62 The status field is correct. Can anybody help me? Thanks -- Josep Sanmarti Analista de Projectes OpenWired Caballero 87 - Bajos 08029 - Barcelona Tel. 93 495 0990 Fax. 93 419 4591 Openwired Alejandro Villegas,29 28043 - MADRID - ESPAÑA Teléfono: 91 300 51 09 Fax: 91 300 28 13 http://www.openwired.com