Re: BUG #5748: Invalid oidvector data during binary recv - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5748: Invalid oidvector data during binary recv
Date
Msg-id 15298.1289490490@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5748: Invalid oidvector data during binary recv  ("Yeb Havinga" <yebhavinga@gmail.com>)
Responses Re: BUG #5748: Invalid oidvector data during binary recv  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: BUG #5748: Invalid oidvector data during binary recv  (Yeb Havinga <yebhavinga@gmail.com>)
List pgsql-bugs
"Yeb Havinga" <yebhavinga@gmail.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.

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?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #5748: Invalid oidvector data during binary recv
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #5748: Invalid oidvector data during binary recv