Re: index keeps on growing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian McCane <bmccane(at)mccons(dot)net>
Cc: Jean-Christophe ARNU <jc(dot)arnu(at)free(dot)fr>, pgsql-admin(at)postgresql(dot)org
Subject: Re: index keeps on growing
Date: 2002-06-19 14:48:31
Message-ID: 4682.1024498111@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Brian McCane <bmccane(at)mccons(dot)net> writes:
> Okay, thanks for that information. I will have to dig through my
> pgsql-admin archive here and find the code for setting the primary key
> flag. Unless of course someone would like to offer me the information
> *HINT* :).

If you'd like to be backwards-compatible with older backends, I think
you need to reach in and set the indisprimary field of the pg_index
row for the index.

As of 7.2 or so there is an ALTER TABLE ADD PRIMARY KEY syntax that you
could use instead of creating the index directly. This would be better
since it doesn't require superuser privileges...

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Paul Warner 2002-06-19 14:55:03 pg_dump and restore problem (7.0.? to 7.2) more info
Previous Message Rajesh Kumar Mallah. 2002-06-19 14:46:29 Re: Backups and errors