From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Kristofer Munn <kmunn(at)munn(dot)com>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Arrays broken on temp tables |
Date: | 1999-11-06 21:33:33 |
Message-ID: | 2954.941924013@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> I'm betting that something in the array code is somehow bypassing the
> normal table lookup mechanism, and is managing to see the underlying
> temp-table name that should be hidden from it. Will look further...
Yup, here it is, in parse_target.c:
/*
* If there are subscripts on the target column, prepare an
* array assignment expression. This will generate an array value
* that the source value has been inserted into, which can then
* be placed in the new tuple constructed by INSERT or UPDATE.
* Note that transformArraySubscripts takes care of type coercion.
*/
if (indirection)
{
Attr *att = makeNode(Attr);
Node *arrayBase;
ArrayRef *aref;
att->relname = pstrdup(RelationGetRelationName(rd)->data);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Next question is what to do about it --- the original table name
doesn't seem to be conveniently available in this routine. A quick
search for other uses of RelationGetRelationName shows other places
that may have related bugs. Possibly, temprel.c needs to provide
a reverse-lookup routine that will give back the user name of a table
that might be a temp table?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-11-06 21:54:19 | Re: [HACKERS] Arrays broken on temp tables |
Previous Message | Thomas Lockhart | 1999-11-06 21:20:17 | Re: [HACKERS] PostgreSQL 6.5.3 built, but not released ... |