Re: pltcl - "Cache lookup for attribute" error - version 2 - Mailing list pgsql-patches

From Patrick Samson
Subject Re: pltcl - "Cache lookup for attribute" error - version 2
Date
Msg-id 20040127090342.38502.qmail@web60301.mail.yahoo.com
Whole thread Raw
In response to Re: pltcl - "Cache lookup for attribute" error - version 2  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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/

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: improve join_collapse_limit docs
Next
From: "Mark Cave-Ayland"
Date:
Subject: Re: ANALYZE patch for review