Skip site navigation (1) Skip section navigation (2)

Re: pltcl - "Cache lookup for attribute" error - version 2

From: Patrick Samson <p_samson(at)yahoo(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: pltcl - "Cache lookup for attribute" error - version 2
Date: 2004-01-27 09:03:42
Message-ID: 20040127090342.38502.qmail@web60301.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-patches
--- Tom Lane wrote:
> I wrote:
> > Patrick Samson writes:
> >> - Add the same filter in the build of TG_relatts.
> >> This will prevent a tcl script which loops on
> >> TG_relattrs to fail in trying to use a dropped
> >> column.
> 
> > This is deliberately *not* done in 7.4, because it
> would break the
> > documented behavior of TG_relatts:
> 
> I thought of a good compromise solution: instead of
> putting the dropped
> columns' names into TG_relatts, we can put
> empty-string list elements.
> This preserves the attnum correspondence, and
> anything that iterates
> over TG_relatts should be coded to ignore empty
> elements anyway, no?
> 

OK, I didn't pay attention to the numbering concern.
Your compromise suits me. I prefer to filter on
empty strings than on something with some dots in it.
Or to run an spi_exec to test the attisdropped.

Tom, your suggestion to look in OLD or NEW for live
columns may be cover all situations. I use a code
(not mine, but I try to make it run on Cygwin) that
use a NULL value if [info exists NEW($field)] is
false.

Many thanks to all.
Patrick


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

In response to

pgsql-patches by date

Next:From: Mark Cave-AylandDate: 2004-01-27 13:44:00
Subject: Re: ANALYZE patch for review
Previous:From: Tom LaneDate: 2004-01-27 06:40:21
Subject: Re: improve join_collapse_limit docs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group