Is there an upper limit on the size of an array if it is indexed?

From: AlexK <alkuzo(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Is there an upper limit on the size of an array if it is indexed?
Date: 2014-02-24 20:30:18
Message-ID: 1393273817988-5793380.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Is-there-an-upper-limit-on-the-size-of-an-array-if-it-is-indexed-tp5793380.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rob Sargent 2014-02-24 20:35:08 Re: Is there an upper limit on the size of an array if it is indexed?
Previous Message David Johnston 2014-02-24 18:27:54 Re: Postgres behavior - Conditional statements