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

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch to add a primary key using an existing index
Date: 2010-12-04 00:11:12
Message-ID: 4CF98720.8070002@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-04 00:38:04 Re: ERROR: could not identify an equality operator for type box
Previous Message Ross J. Reedstrom 2010-12-03 23:10:08 Re: Patch to add a primary key using an existing index