Re: Cannot use more than 16 attributes in an index - Mailing list pgsql-general

From scott.marlowe
Subject Re: Cannot use more than 16 attributes in an index
Date
Msg-id Pine.LNX.4.33.0208061230350.1261-100000@css120.ihs.com
Whole thread Raw
In response to Cannot use more than 16 attributes in an index  ("Thomas Bolden" <tbolden@mail.state.mo.us>)
List pgsql-general
On Tue, 6 Aug 2002, 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
toincrease this limit. 
> I have installed Ver 7.2.1 Postgresql on FreeBSD 4.6.

Thank god for having the source eh?

Just edit this file:

/path/to/src/postgresql-7.2.1/src/include/pg_config.h.in

and on about line 167 you'll find a couple of lines like this:

#define INDEX_MAX_KEYS          16
#define FUNC_MAX_ARGS           INDEX_MAX_KEYS

Just change that 16 to 32 or something like it, go the the
/path/to/src/postgresql-7.2.1 directory and do

./configure (your --configuration-switches go here...)
make
make install

and you're set.


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Primary Key: How Do I Generate One For Insert ...
Next
From: John Gray
Date:
Subject: Re: Cannot use more than 16 attributes in an index