On Fri, Oct 7, 2011 at 09:50, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Oct 7, 2011 at 11:19 AM, Alex Hunsaker <badalex@gmail.com> wrote:
>> My only thought is
>> perhaps we should add that missing unique index on (conrelid,
>> conname). If we are not going to support duplicate names in the code,
>> we might as well enforce it. No?
>
> Not sure. There could be performance or other ramifications to that.
> For now I'm more interested in fixing this particular bug than I am in
> getting into a wider world of re-engineering...
Yeah, looking at the code a bit closer we would also want to fix
various places to take advantage of the index. Seems like it could be
a big win when you have thousands of constraints (albeit only in the
add/drop case).
If I find the time maybe Ill submit something along these lines for
the next commit fest.
Thanks!