Re: More ADD CONSTRAINT behaviour questions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: More ADD CONSTRAINT behaviour questions
Date: 2001-07-23 03:04:44
Message-ID: 9370.995857484@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
>> 1. A non-unique index is already defined over (a, b)
>>
>> - Either add new index or promote existing one to unique?

> Promoting is in my too-hard basket, so I will simply add a new unique index?
> Too bad if it slows them down, as they should know better? Should I issue a
> NOTICE warning them that they have overlapping indices?

Seems reasonable. I suppose dropping the old index wouldn't be a good
idea ;-)

> The other issue is that I'm not sure how much argument checking I should do
> in my code, and how much I should leave for DefineIndex?

I'd say there's no value in expending code space on duplicated error
checks --- *unless* you can give a more specific/appropriate error
message than DefineIndex would.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Grant 2001-07-23 03:49:07 Large objects and table deletion.
Previous Message Bruce Momjian 2001-07-23 03:01:05 Re: Improving pg_hba.conf