Re: Patch to add a primary key using an existing index - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Patch to add a primary key using an existing index
Date
Msg-id 4CF98720.8070002@agliodbs.com
Whole thread Raw
In response to Re: Patch to add a primary key using an existing index  (Robert Treat <rob@xzilla.net>)
List pgsql-hackers
On 12/3/10 2:16 PM, Robert Treat wrote:
> Uh, the syntax I posted was based on this currently valid syntax: 
> 
> ALTER TABLE table_name ADD PRIMARY KEY (column_list); 
> 
> The constraint bit is optional, which is why I left it out, but I
> presume it would be optional with the new syntax as well... Also, I'm
> not wedded to the idea of keeping the column list, but if you are
> arguing to make it super consistent, then I think you need to include it.   

No, I'm not in that case.  I'm suggesting we omit the column list and
skip directly to USING.

Why no column list?
1. The extra typing will annoy our users
2. The column list provides opportunities for users to fail to be
consistent with the index and get errors

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


pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: Patch to add a primary key using an existing index
Next
From: Tom Lane
Date:
Subject: Re: ERROR: could not identify an equality operator for type box