From: | Patrick Samson <p_samson(at)yahoo(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | pltcl - "Cache lookup for attribute" error - version 2 |
Date: | 2004-01-23 09:13:30 |
Message-ID: | 20040123091330.92487.qmail@web60304.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
After a deeper analysis, this post supersedes my
previous one with the same subject.
I got the error message:
ERROR: pltcl: Cache lookup for attribute
'........pg.droppped.7........' type 0 failed
when a pltcl trigger handler is fired.
Attribute names beginning with a dot are filtered
just in one place, in pltcl_trigger_handler().
(version 7.3.5)
Attached is a patch to :
- Add a filter in two other places, in relation
with the mentioned error message:
pltcl_set_tuple_values()
pltcl_build_tuple_argument()
- 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.
Note 1: the filter method is changed from testing if
attname begins with a dot to testing the setting
of attisdropped.
I presume (to be confirmed or contradicted by a
more authoritative developer than me) that the
original dot filtering intent was to filter
dropped columns. In other words, there is no
case where a column name begins with '.' except
dropped columns. If this is right, testing
attisdropped
is an adequate and more readable replacement.
Note 2: with the addition of the filter in
pltcl_build_tuple_argument(), filtering in
pltcl_trigger_handler() is no more needed, so I
put these lines in comments (may be removed in
a final release).
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
Attachment | Content-Type | Size |
---|---|---|
diff_pltcl3.txt | text/plain | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2004-01-23 11:08:54 | Re: cache control? |
Previous Message | Tom Lane | 2004-01-23 00:48:13 | Re: fix recent WITH OIDS bug |