Do we want Bugzilla to be case-sensitive or case-insensitive?

Nick Barnes Nick.Barnes at
Thu Nov 3 11:42:15 UTC 2005

At 2005-11-03 01:14:41+0000, =?UTF-8?B?RnLDqWTDqXJpYyBCdWNsaW4=?= writes:
> >>Do we want Bugzilla to be case-sensitive or case-insensitive?
> > 
> > 
> > insensitive.
> Forcing all comparisons to be case-insensitive would require to
> rewrite 98% of all SQL queries!! .... or to find another way to
> force Pg to be case-insensitive. But it appears that is *not*
> possible to change this behavior in PostgreSQL, at all.

What comparisons?  Most strings in Bugzilla are either:

1. free-form text (in shortdesc, longdesc, etc): to search this
   case-insensitively, use the case-insensitive operators (~*, ILIKE)
   or downcase before comparing: lower(mycol) = 'some value'.  If you
   are going to do lower(mycol) and want an index to help, it needs to
   be an expression index on the lower(mycol) expression.

2. drop-down fields, entered once by an administrator (or manager) and
   then selected from drop-downs.  Are these strings ever compared
   against anything else in subsequent operation?  In any case, force
   case-insensitive uniqueness on creation, either by searching for a
   match or by having a UNIQUE expression index on lower(mycol).

3. email addresses.  These should retain case (like
   'LpSolit at') but we should reject case-duplicates on
   creation (In other words, as for #2).  Searching should use
   case-insensitive operators, as for #1.

> I don't know how Oracle behaves, though.

It's case-sensitive, with a variety of hacks (broadly similar to
PostgreSQL's, although uglier) to force insensitivity.  The brand new
Oracle 10gR2 release has some changes in this area.

Nick B

More information about the developers mailing list