pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Fielding <rob@dsvr.net>
To: PostgreSQLAdmin-mailing lista <pgsql-admin@postgresql.org>
Subject: ERROR:  pltcl: Cache lookup for attribute
Date: Tue, 25 Nov 2003 11:43:13 +0000
Message-ID: <3FC34051.9050809@dsvr.net> (raw)

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




view thread (2+ messages)  latest in thread

Message-ID: <3FC34051.9050809@dsvr.net>
Permalink:  ../3FC34051.9050809@dsvr.net/
Also on:    postgresql.org/message-id/3FC34051.9050809@dsvr.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: rob@dsvr.net
  Subject: Re: ERROR:  pltcl: Cache lookup for attribute
  In-Reply-To: <3FC34051.9050809@dsvr.net>
  References: <3FC34051.9050809@dsvr.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox