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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-patches by date

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