X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 59FE5D1DBBF for ; Tue, 25 Nov 2003 11:41:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 16923-06 for ; Tue, 25 Nov 2003 07:40:49 -0400 (AST) Received: from mail.dsvr.co.uk (mail.dsvr.co.uk [212.69.192.9]) by svr1.postgresql.org (Postfix) with ESMTP id ABFB9D1B50A for ; Tue, 25 Nov 2003 07:40:45 -0400 (AST) Received: from dsvr.net (eth0.rt1.o1-1.tck.dsvr.net [::ffff:212.69.216.20]) by mail.dsvr.co.uk with esmtp; Tue, 25 Nov 2003 11:40:33 +0000 Message-ID: <3FC34051.9050809@dsvr.net> Date: Tue, 25 Nov 2003 11:43:13 +0000 From: Rob Fielding User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030807 X-Accept-Language: en-us, en MIME-Version: 1.0 To: PostgreSQLAdmin-mailing lista Subject: ERROR: pltcl: Cache lookup for attribute Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=USER_AGENT_MOZILLA_UA X-Spam-Level: X-Archive-Number: 200311/420 X-Sequence-Number: 11407 Hi, I have a general table logging function and a generic log and edits table pair attached to all the tables I want to log changes with. So therefore I have one generic function, called by multiple triggers, each of which glue instancies of TABLE to a log/edits pair. The trigger is set on the insert/update events, as you'd expect. The function is written in TCL and interogates the NEW and OLD arrays. One of the tables has just been modified, and the following error is returned whenever an update is made : ERROR: pltcl: Cache lookup for attribute '........pg.dropped.5........' type 0 failed I've dropped the trigger off this table and reattached it, but this didn't work. I'm hesitant to drop the function the trigger is based on because that's going to break every other instance of this trigger. I am also hesitant to do create or replace function incase this screws up all the other triggers. Fortunately for me, I've pulled a copy off this live site onto my workstation. I didn't preserve OID's, so gave it a fresh start. I performed the same table modification, and the trigger still works fine :/. Perhaps something like OID order due to the age of the function and table? I duno, but I've seen it in the past (7.1/7.2 days) where PG doesn't like you fussing with tables and triggers and functions - but I never tried to figure out why. I would prefer to update the on-line db without taking it down and replacing it with a freshly pg_dumped version. Is it possible to 'fix' any of the pg_ tables by hand to solve this cache lookup error? The master DB is 7.3.4, the version on my workstation is 7.3.2. If it's not possible, I'll have to do a dump and restore, which is a bit of sledge hammer fix imo. Cheers for any insight. -- Rob Fielding rob@dsvr.net www.dsvr.co.uk Development Designer Servers Ltd