From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Steve Singer <ssinger_pg(at)sympatico(dot)ca>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, r t <pgsql(at)xzilla(dot)net>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
Subject: | Re: Patch to add a primary key using an existing index |
Date: | 2011-01-25 00:56:06 |
Message-ID: | AANLkTimovwShRt06m=VyhZyTKQFpY8bOSoSDQg+fghok@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 24, 2011 at 7:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> One other issue that might be worthy of discussion is that as things
> stand, execution of the ADD CONSTRAINT USING INDEX syntax will cause
> the constraint to absorb the index as an INTERNAL dependency. That
> means dropping the constraint would make the index go away silently ---
> it no longer has any separate life. If the intent is just to provide a
> way to get the effect of ALTER ADD PRIMARY KEY CONCURRENTLY, then this
> behavior is probably fine. But someone who believes DROP CONSTRAINT
> exactly reverses the effects of ADD CONSTRAINT might be surprised.
> Comments?
Well, I think the behavior as described is what we want. If the
syntax associated with that behavior is going to lead to confusion,
I'd view that as a deficiency of the syntax, rather than a deficiency
of the behavior. (I make this comment with some reluctance
considering the amount of bikeshedding we've already done on this
topic, but... that's what I think.)
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2011-01-25 01:03:20 | Re: Re: patch: fix performance problems with repated decomprimation of varlena values in plpgsql |
Previous Message | Bruce Momjian | 2011-01-25 00:43:02 | Re: pg_test_fsync problem |