From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, Steve Singer <ssinger(at)ca(dot)afilias(dot)info>, Steve Singer <ssinger_pg(at)sympatico(dot)ca>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to add a primary key using an existing index |
Date: | 2010-12-03 20:04:01 |
Message-ID: | 4CF94D31.4000607@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 03.12.2010 21:58, Alvaro Herrera wrote:
> Excerpts from Heikki Linnakangas's message of vie dic 03 16:45:59 -0300 2010:
>
>> ALTER TABLE table_name SET PRIMARY KEY USING INDEX index_name. Quite
>> verbose, but imho USING makes it much more clear that it's an existing
>> index.
>
> I was going to post the same thing (well except I was still thinking in
> ADD PRIMARY KEY rather than SET PRIMARY KEY). I think SET is better
> than ADD in that it is a bit different from the syntax that makes it
> create a new index. On the other hand, it could also be pointlessly
> annoying.
I think I'd prefer ADD too. I didn't pay attention to that when I posted.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2010-12-03 20:25:02 | Re: [PATCH] Revert default wal_sync_method to fdatasync on Linux 2.6.33+ |
Previous Message | Heikki Linnakangas | 2010-12-03 20:02:24 | Re: We really ought to do something about O_DIRECT and data=journalled on ext4 |