Lists: | pgsql-patches |
---|
From: | Joachim Wieland <joe(at)mcknight(dot)de> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Trivial doc-patch for constraint description |
Date: | 2005-12-05 12:27:46 |
Message-ID: | 20051205122746.GA3242@mcknight.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
Hi,
there's a paragraph in the ALTER TABLE reference page that reads:
DROP CONSTRAINT
This form drops constraints on a table. Currently, constraints on tables
are not required to have unique names, so there may be more than one
constraint matching the specified name. All matching constraints will be
dropped.
To my knowledge, it is no longer possible to create constraints with the
same name for the same relation. When you create a constraint and specify
the same name explictly, an error is raised. Implicit constraint creation
won't choose an existing name either and up to now you could not rename a
constraint. Renaming works with the patch I sent in a few hours ago but this
patch as well won't allow constraints with identical names on the same
relation.
The attached patch thus removes the note in the docs.
Joachim
Attachment | Content-Type | Size |
---|---|---|
constraint_doc.diff | text/plain | 1019 bytes |
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Joachim Wieland <joe(at)mcknight(dot)de> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Trivial doc-patch for constraint description |
Date: | 2005-12-08 21:35:53 |
Message-ID: | 200512082135.jB8LZrL27419@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
Patch applied to CVS HEAD and 8.1.X. Thanks.
---------------------------------------------------------------------------
Joachim Wieland wrote:
> Hi,
>
> there's a paragraph in the ALTER TABLE reference page that reads:
>
> DROP CONSTRAINT
>
> This form drops constraints on a table. Currently, constraints on tables
> are not required to have unique names, so there may be more than one
> constraint matching the specified name. All matching constraints will be
> dropped.
>
> To my knowledge, it is no longer possible to create constraints with the
> same name for the same relation. When you create a constraint and specify
> the same name explictly, an error is raised. Implicit constraint creation
> won't choose an existing name either and up to now you could not rename a
> constraint. Renaming works with the patch I sent in a few hours ago but this
> patch as well won't allow constraints with identical names on the same
> relation.
>
> The attached patch thus removes the note in the docs.
>
>
> Joachim
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073