Re: ALTER TABLE .. ADD PRIMARY KEY .. USING INDEX has dump-restore hazard

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE .. ADD PRIMARY KEY .. USING INDEX has dump-restore hazard
Date: 2015-07-22 00:34:53
Message-ID: CAB7nPqTF6zpLvrBWDgi4hvSH_7f519OAepTsqF5r4rTcs-tcQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 22, 2015 at 1:23 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Notice that the collation specifier is gone. Oops.

As it is not possible to specify directly a constraint for a PRIMARY
KEY expression, what about switching dumpConstraint to have it use
first a CREATE INDEX query with the collation and then use ALTER TABLE
to attach the constraint to it? I am noticing that we already fetch
the index definition in indxinfo via pg_get_indexdef. Thoughts?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2015-07-22 00:52:46 Re: [PATCH] Reload SSL certificates on SIGHUP
Previous Message Qingqing Zhou 2015-07-22 00:15:42 Planner debug views