"Andreas Joseph Krogh" <[EMAIL PROTECTED]> writes:

> Ooops, just fugured that out. But - it still doesn't use the index if I 
> remove 
> the "varchar_pattern_ops". I solved it by adding a function:

Hm, well it does for me, you would have to post your explain analyze to see
what's going on.

> Another question then: Why doesn't "varchar_pattern_ops" handle ordering? 
> This 
> means I need 2 indexes on the columns I want to match with LIKE and ORDER BY. 
> Just doesn't seem right to need 2 "similar" indexes...

If you initd in the C locale you only need one index. In other locales the
collation order and the pattern order are different.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to