Re: Patch to add a primary key using an existing index

Josh Berkus <josh@agliodbs.com>

From: Josh Berkus <josh@agliodbs.com>
To: pgsql-hackers@postgresql.org
Date: 2010-12-04T22:13:42Z
Lists: pgsql-hackers
On 12/04/2010 12:37 PM, Robert Haas wrote:
> What would make sense to me is: create a pk constraint with the sane name as the existing unique index.  If that constraint name already exists, error.

+1, agreed.  Based on this, the syntax should be obvious.

We'll need to doc what to do in the event of a name collision error, 
though (rename the other constraint).  Hmmm, can you rename a constraint?

-- 
                                   -- Josh Berkus
                                      PostgreSQL Experts Inc.
                                      http://www.pgexperts.com