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

Re: BUG #5748: Invalid oidvector data during binary recv

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Yeb Havinga <yebhavinga(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5748: Invalid oidvector data during binary recv
Date: 2010-11-11 16:11:23
Message-ID: 15780.1289491883@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> On 11.11.2010 17:48, Tom Lane wrote:
>> The problem seems to be that array_recv passes back a zero-dimensional
>> array, *not* a 1-D array, when it observes that the input has no
>> elements.  A zero-D array is not part of the subset of possible arrays
>> that we allow for oidvector.

> Yeah, I just reached that conclusion too..

>> I'm less than convinced that this is worth fixing.  oidvector is not
>> intended for general-purpose use anyway.  What's the use-case where this
>> would come up?

> I don't see any use case either, but I guess it would be nice to fix for 
> the sake of completeness.

The least risky fix would be to make oidvectorrecv check for a zero-D
result from array_recv and replace it with an empty 1-D result.  I'm
not sufficiently excited about it to do it myself, but if you are,
have at it.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2010-11-11 16:14:33
Subject: Re: BUG #5748: Invalid oidvector data during binary recv
Previous:From: Yeb HavingaDate: 2010-11-11 16:11:17
Subject: Re: BUG #5748: Invalid oidvector data during binary recv

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