Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group