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

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patrick Samson <p_samson(at)Yahoo(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: pltcl - "Cache lookup for attribute" error - version
Date: 2004-01-23 20:03:59
Message-ID: 40117E2F.5090608@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:

> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>> When assigning a tuple to an array, PL/Tcl creates one extra array
>> element .tupno telling the SPI_tuptable index of the result tuple. I
>> think I originally planned to have more of these critters ... but
>> probably never really needed them. It is in there since 6.3!
>
>> Bottom line is, if one has a trigger, and inside the trigger he does an
>> SPI_exec, fetches a tuple into an array and then returns [array get x]
>> instead of new or old ... so from the back through the right chest into
>> the left eye ... then it will fail if the .tupno isn't filtered out.
>
> Hm. Perhaps we should tighten the test to reject only ".tupno", rather
> than any name starting with dot?

Man you have worries ... aren't people who use identifiers with a
leading dot supposed to have problems? What about changing it to ..
instead? I mean, how does such a thing look like?

SELECT ".. some column .." FROM ".. the schema ..".".. a table .."
WHERE ".. the schema ..".".. a table ..".".. some column .."
IN ('.oh.', '.give.', '.me.', '.a.', '.break!');

If you like to, tighten it.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2004-01-23 20:04:33 cleanup psql memory handling
Previous Message Tom Lane 2004-01-23 19:38:51 Re: pltcl - "Cache lookup for attribute" error - version 2