array column and b-tree index allowing only 8191 bytes

From: Celso Pinto <cpinto(at)yimports(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: array column and b-tree index allowing only 8191 bytes
Date: 2008-06-07 00:05:08
Message-ID: 1212797108.8265.9.camel@starfish
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I'm checking out some features in pgsql and found out about an array
datatype. As I'm curious to find out how well it performs, I've created
a table that contains an integer[] column and a script to insert about
500K rows in it. The length for the integer[] column is random (can be
10, can be 5000, can be more than that), as are the values in it.

When trying to insert a row, I get the following error:

index row requires 9796 bytes, maximum size is 8191

If I understood correctly, this is a limit of the b-tree index. Usually
you'd want to use another type of index but, again if I understood
correctly, those are meant mostly for full-text indexing.

Remember, I'm doing this for recreational purposes (the array type is
there, wanted to check out it's performance so why not? :-) ).

So my questions are: is this at all possible? If so, is is possible to
increate that maximum size?

Regards,
Celso

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ralph Smith 2008-06-07 00:58:28 strpos NOT doing what I'd expect
Previous Message Ethan Collins 2008-06-06 22:55:09 accessing table in LIFO order