Re: Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT
Date
Msg-id 21221.1033397455@sss.pgh.pa.us
Whole thread Raw
In response to Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT  ("Tim Knowles" <tim@ametco.co.uk>)
Responses Re: Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT  ("Tim Knowles" <tim@ametco.co.uk>)
List pgsql-bugs
"Tim Knowles" <tim@ametco.co.uk> writes:
> ... I do though think the error message could do with a slight change
> of wording from:

> ERROR:  Cannot drop index t1_pkey because constraint c1 on table t1 requires
> it
>         You may drop constraint c1 on table t1 instead
> to:

> ERROR:  Cannot drop index t1_pkey because constraint c1 on table t1 requires
> it
>         To drop index t1_pkey you will need to drop the constraint c1 from
> table t1 first

Well, no, because the second message is not accurate at all for this
situation.  The hint to drop the constraint *instead* is perfectly
correct; when you do that the index will go away too.

I was thinking more of rewording the first line, perhaps like this:

> ERROR:  Cannot drop index t1_pkey because it is part of constraint c1 on table t1

but wasn't completely satisfied with that either.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Tim Knowles"
Date:
Subject: Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT
Next
From: "Tim Knowles"
Date:
Subject: Re: Bug #785: 7.3b2 : Possible Inconsistency with DROP INDEX ... CASCADE and DROP CONSTRAINT