Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id E101D1337B5A for ; Thu, 11 Nov 2010 11:36:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 47999-08 for ; Thu, 11 Nov 2010 15:36:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) by mail.postgresql.org (Postfix) with SMTP id A40BF1337B8C for ; Thu, 11 Nov 2010 11:36:23 -0400 (AST) Received: from source ([209.85.215.54]) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKTNwNd57n8a/LDtM82HinayTeL4+e2tV2@postini.com; Thu, 11 Nov 2010 07:36:24 PST Received: by mail-ew0-f54.google.com with SMTP id 4so807027ewy.13 for ; Thu, 11 Nov 2010 07:36:23 -0800 (PST) Received: by 10.213.114.8 with SMTP id c8mr1860021ebq.67.1289489782020; Thu, 11 Nov 2010 07:36:22 -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 v56sm2043095eeh.14.2010.11.11.07.36.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 07:36:21 -0800 (PST) Message-ID: <4CDC0D76.8070802@enterprisedb.com> Date: Thu, 11 Nov 2010 17:36:22 +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: Yeb Havinga CC: pgsql-bugs@postgresql.org Subject: Re: BUG #5748: Invalid oidvector data during binary recv References: <201011111430.oABEUVPe067398@wwwmaster.postgresql.org> In-Reply-To: <201011111430.oABEUVPe067398@wwwmaster.postgresql.org> Content-Type: text/plain; charset=UTF-8; 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/67 X-Sequence-Number: 28647 On 11.11.2010 16:30, Yeb Havinga wrote: > > The following bug has been logged online: > > Bug reference: 5748 > Logged by: Yeb Havinga > Email address: yebhavinga@gmail.com > PostgreSQL version: 9.0.1 > Operating system: Linux > Description: Invalid oidvector data during binary recv > Details: > > 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 error caused by the ARR_LBOUND(result)[0] != 0) check in oidvectorrecv, > and after some debugging and looking at common values of the lbound, I > wonder if this check itself is correct. That check was added a while ago to make it impossible to inject values into the system that the text input functions wouldn't accept. There is no way to create an oidvector with non-zero lower bound through oidvectorin. But it looks like the check is not right for an empty array. Will fix, thanks for the report. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com