Re: problem with select where like ']'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)pl
Cc: PGSQL-SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: problem with select where like ']'
Date: 2000-10-17 19:33:38
Message-ID: 1986.971811218@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hubert depesz lubaczewski <depesz(at)depesz(dot)pl> writes:
> but i'm just wondering why like ']' doesn't work.

What LOCALE setting are you running the postmaster in?

']' is not a special character as far as LIKE is concerned, but
I suspect you may be seeing another variant of the problems that
LIKE index optimization has with peculiar collation rules.
You can find plenty of discussion of this in the mailing list archives
:-(

If there is an index on the field you are doing LIKE on, try dropping
the index to see if that makes the problem go away.

Another possibility is that you have been careless about always starting
the postmaster with the same LOCALE setting, in which case the index
may actually be corrupt (out of order) due to different records having
been inserted with different ideas about what the sort ordering should be.
In that case, dropping and recreating the index should help.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message KuroiNeko 2000-10-17 20:07:29 Re: problem with select where like ']'
Previous Message Peter Mount 2000-10-17 19:23:17 Re: JDBC Performance