From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | "Karl O(dot) Pinc" <kop(at)meme(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Doc patch: Document names of automatically created constraints and indexes |
Date: | 2012-11-25 22:43:19 |
Message-ID: | CA+TgmoYv0+zO8aP-7koPV1-DX1zCYkYtaocEO3mtVzWbkOb4KQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Nov 24, 2012 at 6:01 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On Wed, 2012-11-21 at 15:12 -0500, Robert Haas wrote:
>> On Sat, Nov 17, 2012 at 1:22 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>> > On Mon, 2012-11-12 at 11:42 -0600, Karl O. Pinc wrote:
>> >> Could ALTER TABLE use an option to drop the
>> >> primary key constraint? I needed to do that,
>> >> found it was not obvious, and this lead me to
>> >> try to improve things.
>> >
>> > That could be useful, I think. But it might open a can of worms.
>>
>> Would the new option be syntactic sugar around ALTER TABLE ... DROP
>> CONSTRAINT "put_the_name_of_the_primary_key_here"?
>
> Yes, I think so. We already have DROP NOT NULL, which is a similar case
> (except, of course, that it was born more out of necessity, because
> not-null constraints don't have a name, but that's being worked on).
Yeah. As usability issues go I think the lack of this syntax is a
fairly minor one, but I confess to having wanted to be able to type
ALTER TABLE foo DROP PRIMARY KEY more than once, so I wouldn't argue
if someone wanted to go make that happen.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-11-25 23:31:46 | Re: MySQL search query is not executing in Postgres DB |
Previous Message | Alexander Korotkov | 2012-11-25 21:03:17 | Re: WIP: index support for regexp search |