Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3BEAD1337B5A for ; Thu, 11 Nov 2010 12:07:07 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 77676-10 for ; Thu, 11 Nov 2010 16:06:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f46.google.com (mail-ew0-f46.google.com [209.85.215.46]) by mail.postgresql.org (Postfix) with ESMTP id 615DB1337B34 for ; Thu, 11 Nov 2010 12:06:55 -0400 (AST) Received: by ewy7 with SMTP id 7so1200842ewy.19 for ; Thu, 11 Nov 2010 08:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=j4cfFjp9p95VqqGKaOy12yxMtBZQoiqtUmLq8LM5hxg=; b=j+XTlM3fPIzU/DWNAaMKjeOoius/IQPUvAkRpSH2vVblV51sKgx4cAlgeJ9PAvkaHV F5stmqTiZ5FQlMjFQstYR7HjiGLnc9fxh7S4tnYAs54aYlkOgrtCCACP8aOGVb3CdAGw NgJDCuE+gBWpO0XhLe1eFUkVYSbuFjdL8WKc8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=BcutCi68O+L4rt0yjEBWBjnWr3QJ4Iz2MiBH7Od86ixcM+HAwrIUxBdMqX5fav+ZM4 EaR/IYoJRrJAF6eHIeRhLA2zyBDRDVzs17j5wamSCfnYGp1/y/8ijsLIUDnUkfnKsMjc ace2wlsGfCba/X8OzlaPLGjv0zWKVpjSzEdrk= Received: by 10.213.14.146 with SMTP id g18mr435009eba.18.1289491613884; Thu, 11 Nov 2010 08:06:53 -0800 (PST) Received: from [0.0.0.0] (5357DA75.cm-6-8d.dynamic.ziggo.nl [83.87.218.117]) by mx.google.com with ESMTPS id v56sm2077203eeh.2.2010.11.11.08.06.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 08:06:52 -0800 (PST) Message-ID: <4CDC15A5.7050003@gmail.com> Date: Thu, 11 Nov 2010 17:11:17 +0100 From: Yeb Havinga User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org, "w.p.dijkstra@mgrid.net" 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=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/70 X-Sequence-Number: 28650 On 2010-11-11 16: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. > > 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? We're currently reading data from a remote pg_statistics, in particular stavalues1.. etc. Even when our own user defined relations do not make use of oidvectors (or intvectors), during testing on arbitrary pg_statistic rows we encountered this error message. Nonetheless we decided to report it as a bug, since it was not related to anyarray handling, but clearly a bug that oidvector cannot input binary, what it can input as text and output binary. regards, Yeb Havinga