Skip site navigation (1) Skip section navigation (2)

Re: BUG #2694: Memory allocation error when selecting array

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Vitali Stupin <Vitali(dot)Stupin(at)ria(dot)ee>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2694: Memory allocation error when selecting array
Date: 2006-10-18 10:00:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Tom Lane wrote:
> "Vitali Stupin" <Vitali(dot)Stupin(at)ria(dot)ee> writes:
>>The error "invalid memory alloc request size 4294967293" apears when
>>selecting array of empty arrays:
>>select ARRAY['{}'::text[],'{}'::text[]];
> I can get a core dump off it too, sometimes.  The problem is in
> ExecEvalArray, which computes the dimension of the result as [1:2]
> even though there are no elements to put in it.
> Joe, what do you think about this?  Offhand I think that the only
> workable definition is that this case yields another zero-dimensional
> array, but maybe there is another choice?

Sorry for the slow response -- I'm at the airport just heading home from 
a marathon 30 day business trip.

I think producing another zero-dimensional result is the only way that 
makes sense unless/until we change multidimensional arrays to really be 
arrays of array-datatype elements. Right now they're two different things.

> We should probably check all the other array operations to see if they
> have comparable problems.

Yes -- I'll see if I can find the time over the next couple weeks while 


In response to


pgsql-bugs by date

Next:From: Magnus HaganderDate: 2006-10-18 12:06:07
Subject: Re: 8.2beta1 (w32): server process crash (tsvector)
Previous:From: Toru SHIMOGAKIDate: 2006-10-18 00:35:39
Subject: BUG #2704: pg_class.relchecks overflow problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group