Subject | Re: [firebird-support] unique index problem: 'emails' table |
---|---|
Author | David Garamond |
Post date | 2003-11-23T12:07:19Z |
Helen Borrie wrote:
second will be incorrectly rejected by the UNIQUE(local,host) constraint
but correctly accepted by UNIQUE(local,ampersand,host).
removed.
:). But I plan to use a case-insensitive index.
--
dave
> 1) the "@" symbol makes absolutely no difference to the uniqueness of yourYes it does. Try local="ab", host="c" vs. local="a", host="bc". The
> local + host combination.
second will be incorrectly rejected by the UNIQUE(local,host) constraint
but correctly accepted by UNIQUE(local,ampersand,host).
> 3) you don't need the computed column in storage (see example below)Yes, I put it there just for convenience. If proven unused, it will be
removed.
> Depending on how well you parse input, you might need to maintain anThanks, Helen. I know about this standard technique (from you actually
> indexed uppercase proxy column for the two columns and make search
> conditions case-insensitive. The practice some people have of using mixed
> case in their email addresses is another major reason not to use them as
> keys. They are *highly* non-atomic.
:). But I plan to use a case-insensitive index.
--
dave