Re: index keeps on growing - Mailing list pgsql-admin

From Tom Lane
Subject Re: index keeps on growing
Date
Msg-id 4682.1024498111@sss.pgh.pa.us
Whole thread Raw
In response to Re: index keeps on growing  (Brian McCane <bmccane@mccons.net>)
List pgsql-admin
Brian McCane <bmccane@mccons.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

pgsql-admin by date:

Previous
From: Paul Warner
Date:
Subject: pg_dump and restore problem (7.0.? to 7.2)
Next
From: "Rajesh Kumar Mallah."
Date:
Subject: Re: How restore file system backups?