Re: rename constraint behavior for duplicate names? - Mailing list pgsql-hackers

From Allan Wang
Subject Re: rename constraint behavior for duplicate names?
Date
Msg-id 1125612263.15631.19.camel@localhost
Whole thread Raw
In response to Re: rename constraint behavior for duplicate names?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 2005-09-01 at 17:55 -0400, Tom Lane wrote:
> Allan Wang <allanvv@gmail.com> writes:
> > Alright, I see why the checks are still needed. The unique index should
> > be on relname, conname right? Also looking into DROP CONSTRAINT's code,
> > it gives a notice about "multiple constraint names dropped" when
> > RemoveRelConstraints(rel, conname) returns > 1. This check isn't needed
> > anymore right? Also RemoveRelConstraints can be simplified to assume
> > only one row will need removing, and be turned into a void function?
> 
> Not unless you want to break the "quiet" option for ATExecDropConstraint.

Is the quiet option supposed to work anyway other than suppressing the
not exists error? Since there can't be multiple constraint names the
notice is never executed anyway. Otherwise I don't see how it would
break. (It would still be used for suppressing the not-exists error)

Allan Wang



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: rename constraint behavior for duplicate names?
Next
From: Simon Riggs
Date:
Subject: Re: Version number in psql banner