"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