Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI2FA-0001JD-U0 for pgsql-sql@arkaria.postgresql.org; Mon, 24 Feb 2014 20:35:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WI2FA-0007KZ-D5 for pgsql-sql@arkaria.postgresql.org; Mon, 24 Feb 2014 20:35:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI2F9-0007Iz-Fg for pgsql-sql@postgresql.org; Mon, 24 Feb 2014 20:35:15 +0000 Received: from mail-ig0-x22b.google.com ([2607:f8b0:4001:c05::22b]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI2F6-0007lD-Vy for pgsql-sql@postgresql.org; Mon, 24 Feb 2014 20:35:15 +0000 Received: by mail-ig0-f171.google.com with SMTP id l13so516113iga.4 for ; Mon, 24 Feb 2014 12:35:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=5s/lHEzgtNk+mkKWxmOwXs/8+vnk1MEvQOa6mz+TMD4=; b=l2gCHa+3y2GyZeXJVAQzNn4MopQ/QCQ7GEbA5Bfz5EoDooSaxDZr41P5/9kWeyyGDm kRnTj25sw7m57jcFnzGRl7NNow2xZ/ADNpy4WqrqB2VTXfrV/ipPcjrvTtgEsNmU8nUP nZ/RPqjyx2p4Z4ZavUo93+dX9cH9yfykSWJ8oFdsoNz//MVhK1T82RjRe2sXLMwUsWsn Sa2kWfISmCVzin/uFUd2PthV1qjuq/LBn115YoimMGoZISt2g1sU/ZA4+uXQOMTm4fD+ 6qyaNZnj5H6ATho5CiP3Rz7AfM5DVVB/54Hx8K6YjON2vgwYjBGmHuyBJcJX12pS9Wg8 lC3g== X-Received: by 10.50.137.100 with SMTP id qh4mr16255238igb.4.1393274111033; Mon, 24 Feb 2014 12:35:11 -0800 (PST) Received: from stability.med.utah.edu (stability.med.utah.edu. [155.100.158.97]) by mx.google.com with ESMTPSA id v5sm29964659igb.0.2014.02.24.12.35.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 12:35:10 -0800 (PST) Message-ID: <530BACFC.7080807@gmail.com> Date: Mon, 24 Feb 2014 13:35:08 -0700 From: Rob Sargent User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Is there an upper limit on the size of an array if it is indexed? References: <1393273817988-5793380.post@n5.nabble.com> In-Reply-To: <1393273817988-5793380.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 02/24/2014 01:30 PM, AlexK wrote: > I have created a unique index on an array of integers, and it works for a > small test case: > > create table i(id int not null primary key, > v int[] not null unique ); > > insert into i(id, v) values(1, ARRAY[1,2]); > > -- fails > insert into i(id, v) values(2, ARRAY[1,2]); > -- succeeds > insert into i(id, v) values(2, ARRAY[2,1]); > > Is there an upper limit on the size of an array being indexed? I am > currently considering arrays of 2K-3K integers. > > > What are the odds? Might be worth the risk. rjs -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql