Re: [HACKERS] Arrays broken on temp tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Arrays broken on temp tables
Date
Msg-id 2914.941922762@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Arrays broken on temp tables  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Arrays broken on temp tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> Bug confirmed.  Wow, that is strange.  There isn't anything about temp
> table that would suggest this would happen.

I see it too.  explain shows something pretty fishy:

regression=> explain update tmpArray set val[3] = 7;
NOTICE:  QUERY PLAN:

Nested Loop  (cost=43043.00 rows=1000000 width=22) ->  Seq Scan on pg_temp.2904.0  (cost=43.00 rows=1000 width=12) ->
SeqScan on tmparray  (cost=43.00 rows=1000 width=10)
 

EXPLAIN

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...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Arrays broken on temp tables
Next
From: Charles Tassell
Date:
Subject: Re: [HACKERS] Re: [GENERAL] indexed regex select optimisation missing?