Re: Setting a pre-existing index as a primary key - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Setting a pre-existing index as a primary key
Date
Msg-id 87wsm16dvk.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Setting a pre-existing index as a primary key  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Responses Re: Setting a pre-existing index as a primary key
List pgsql-hackers
"Jonah H. Harris" <jonah.harris@gmail.com> writes:

> So, would anyone be averse to something like the following:
>
> ALTER TABLE blah ADD ... PRIMARY KEY (...) USING PREBUILT INDEX index_hame
>
> If the user doesn't specify CONSTRAINT constraint_name, it will
> default to current implicit behavior of col_pkey.

This is all so that the primary key shows up with a nice "PRIMARY KEY" instead
of just the unique index? 

The "PREBUILT" seems unnecessary in that syntax.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication
support!


pgsql-hackers by date:

Previous
From: Euler Taveira de Oliveira
Date:
Subject: Re: ecpg localization
Next
From: "Jonah H. Harris"
Date:
Subject: Re: Setting a pre-existing index as a primary key