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

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:02:08
Message-ID: 4CDC1380.2090309@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 11.11.2010 17:48, Tom Lane wrote:
> "Yeb Havinga"<yebhavinga(at)gmail(dot)com> writes:
>> postgres=# create table a as select ''::oidvector;
>> SELECT 1
>> postgres=# copy a to '/tmp/test' with binary;
>> COPY 1
>> postgres=# copy a from '/tmp/test' with binary;
>> ERROR: invalid oidvector data
>
> 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.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Yeb Havinga 2010-11-11 16:11:17 Re: BUG #5748: Invalid oidvector data during binary recv
Previous Message Tom Lane 2010-11-11 15:48:10 Re: BUG #5748: Invalid oidvector data during binary recv