Re: One source of constant annoyance identified - Mailing list pgsql-general

From Tom Lane
Subject Re: One source of constant annoyance identified
Date
Msg-id 4166.1025276595@sss.pgh.pa.us
Whole thread Raw
In response to Re: One source of constant annoyance identified  ("Markus Wollny" <Markus.Wollny@computec.de>)
List pgsql-general
"Markus Wollny" <Markus.Wollny@computec.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



pgsql-general by date:

Previous
From: ktt
Date:
Subject: DbVisualizer 2.1 exeptions
Next
From: "Markus Wollny"
Date:
Subject: Re: One source of constant annoyance identified