From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Barry Lind <barry(at)xythos(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, john(at)xythos(dot)com, wiggs <wiggs(at)xythos(dot)com>, lisa <lisa(at)xythos(dot)com> |
Subject: | Re: [HACKERS] Bug in index scans with Locale support enabled |
Date: | 2000-12-09 01:07:02 |
Message-ID: | 9499.976324022@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Barry Lind <barry(at)xythos(dot)com> writes:
> Now the real problem comes in when either the like or regex operators
> are used in a sql statement.
Right. As of 7.1beta1 we are dealing with this by suppressing LIKE/regex
index optimization in all locales other than "C". That's a pretty crude
answer but it seems the only reliable one :-(.
> Over the last couple of months that I have been on the postgres mail
> lists there have been a few people who reported that queries of the form
> "like '/aaa/bbb/%' don't work. From the above information I have
> determined that such queries don't work if:
> a) database is built with Locale support enabled (--enable-locale)
> b) the database is running with locale en_US
> c) the column the like is being performed on is indexed
> d) the query execution plan uses the above index
en_US is not the only dangerous locale, unfortunately.
I suspect that there are some non-C locales in which we could still do
the optimization safely. The trick is to know which ones have collation
rules that are affected by character combinations, multi-pass ordering
rules, etc. Do you have any info on that?
BTW, thanks for the very clear explanation --- we can point people at
this next time the question comes up, which it does regularly...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2000-12-09 01:11:39 | Re: [HACKERS] Trip to Japan |
Previous Message | Barry Lind | 2000-12-09 00:55:43 | Bug in index scans with Locale support enabled |
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2000-12-09 01:11:39 | Re: [HACKERS] Trip to Japan |
Previous Message | Barry Lind | 2000-12-09 00:55:43 | Bug in index scans with Locale support enabled |