Re: Cannot use more than 16 attributes in an index

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Thomas Bolden" <tbolden(at)mail(dot)state(dot)mo(dot)us>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cannot use more than 16 attributes in an index
Date: 2002-08-06 19:07:02
Message-ID: 200208062007.02309.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 06 Aug 2002 4:43 pm, Thomas Bolden wrote:
> I have a table with 17 attributes in the primary key. When I try to create
> the table I get the message "ERROR: Cannot use more than 16 attributes in
> an index".
> The table description are set by a multi-state consortium. This is a make
> or break for Postgresql. Is there a way to increase this limit. I have
> installed Ver 7.2.1 Postgresql on FreeBSD 4.6.

There's a constant INDEX_MAX_KEYS (pg_config.h) which looks like it could be
increased at the cost of a recompile. I'm sure one of the developers will say
if this is possible.

Failing that, you could use a functional index, although I think there's a max
number of parameters constant you'd have to increase for that. I know you can
increase the number of parameters for a function though.

HTH

- Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ralph Graulich 2002-08-06 19:07:44 Re: Cannot use more than 16 attributes in an index
Previous Message Darren Ferguson 2002-08-06 19:04:32 Re: how to get the primary key of a freshly inserted row