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 [EMAIL PROTECTED]
www.dsvr.co.uk Development Designer Servers Ltd
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
