Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 34DCF1337B5A for ; Thu, 11 Nov 2010 12:02:21 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 41527-07 for ; Thu, 11 Nov 2010 16:02:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og110.obsmtp.com (exprod7og110.obsmtp.com [64.18.2.173]) by mail.postgresql.org (Postfix) with SMTP id 6A04F1337B34 for ; Thu, 11 Nov 2010 12:02:13 -0400 (AST) Received: from source ([209.85.215.172]) by exprod7ob110.postini.com ([64.18.6.12]) with SMTP ID DSNKTNwTg8b5XCJPwz9Fyz1HXPbmD3Tag5UK@postini.com; Thu, 11 Nov 2010 08:02:13 PST Received: by mail-ey0-f172.google.com with SMTP id 10so1172591eyd.17 for ; Thu, 11 Nov 2010 08:02:11 -0800 (PST) Received: by 10.213.4.198 with SMTP id 6mr1893712ebs.81.1289491330494; Thu, 11 Nov 2010 08:02:10 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id v51sm2071651eeh.10.2010.11.11.08.02.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 08:02:08 -0800 (PST) Message-ID: <4CDC1380.2090309@enterprisedb.com> Date: Thu, 11 Nov 2010 18:02:08 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.12) Gecko/20100913 Icedove/3.0.7 MIME-Version: 1.0 To: Tom Lane CC: Yeb Havinga , pgsql-bugs@postgresql.org Subject: Re: BUG #5748: Invalid oidvector data during binary recv References: <201011111430.oABEUVPe067398@wwwmaster.postgresql.org> <15298.1289490490@sss.pgh.pa.us> In-Reply-To: <15298.1289490490@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201011/69 X-Sequence-Number: 28649 On 11.11.2010 17:48, Tom Lane wrote: > "Yeb Havinga" 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