pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ERROR:  pltcl: Cache lookup for attribute
2+ messages / 2 participants
[nested] [flat]

* ERROR:  pltcl: Cache lookup for attribute
@ 2003-11-25 11:43 Rob Fielding <rob@dsvr.net>
  2003-11-25 16:16 ` Re: ERROR: pltcl: Cache lookup for attribute Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Rob Fielding @ 2003-11-25 11:43 UTC (permalink / raw)
  To: pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ERROR: pltcl: Cache lookup for attribute
  2003-11-25 11:43 ERROR:  pltcl: Cache lookup for attribute Rob Fielding <rob@dsvr.net>
@ 2003-11-25 16:16 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2003-11-25 16:16 UTC (permalink / raw)
  To: Rob Fielding <rob@dsvr.net>; +Cc: pgsql-admin

Rob Fielding <rob@dsvr.net> writes:
> 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

7.3 pltcl had some bugs in dealing with dropped columns.  If you aren't
in a position to update to 7.4 yet, you could try applying this patch
locally:

http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/pl/tcl/pltcl.c.diff?r1=1.76&r2=1.77

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-11-25 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-25 11:43 ERROR:  pltcl: Cache lookup for attribute Rob Fielding <rob@dsvr.net>
2003-11-25 16:16 ` Re: ERROR: pltcl: Cache lookup for attribute Tom Lane <tgl@sss.pgh.pa.us>

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