Re: One source of constant annoyance identified

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: One source of constant annoyance identified
Date: 2002-06-28 15:03:15
Message-ID: 4166.1025276595@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de> writes:
> lower(MESSAGE.TEXT) like '%ich%'
> or lower(MESSAGE.TEXT) like 'ich%'
> or lower(MESSAGE.TEXT) like '%ich'

Is whoever wrote this under the misimpression that % can't match zero
characters? You could reduce the number of LIKE tests by a factor of 3,
because the foo% and %foo tests are completely redundant.

But, back to the problem at hand --- it seems like a fair bet that
we must have a memory leak in lower() or LIKE or both. Did you build
with locale or multibyte (or both) enabled? If so, what locale and
what database encoding are you using, respectively?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message joemono 2002-06-28 15:26:04 Foreign Key Constraints
Previous Message ktt 2002-06-28 14:58:39 DbVisualizer 2.1 exeptions