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

Own opclass and LIKE problem again!

From: "Atesz" <atesz(at)ritek(dot)hu>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Own opclass and LIKE problem again!
Date: 2004-04-26 10:11:50
Message-ID: 000101c42b76$e7125490$0b02010a@atesz (view raw or flat)
Thread:
Lists: pgsql-sql
Hi!

Thank you very much the answers for my previous 'Multi ordered select
and indexing' question! I tried your suggestions, and those are working
well. We found a problem when used '(-col2)' instead of 'col2 DESC'.
This solution working as a functional index and in our experience when
the planner evaluates the cost of using this functional index, it uses
0.5% of the table's size. Usually this estimate is bad, and the query is
slow. Why is it working such? Preferably should I ask this on the
HACKERS or PERFORMANCE list?

But my main question how can I force the LIKE operator for using my own
operator class. I can create own LIKE operator, but it won't use my
reverse order operator class (and its indexes). How can I exchange the
standard LIKE operator with my own, which use my special reverse order
indexes?

For examle: (~~ means LIKE)
  col ~~ 'asd%'   working as  ((col >= 'asd'::text) AND (col <
'ase'::text))
I'd like to see the next:
  col /~~ 'asd%'    working as  ((col />= 'asd'::text) AND (col /<
'ase'::text))

Can somebody help us?

Thanks in advance.
Antal Attila



pgsql-sql by date

Next:From: Dan FieldDate: 2004-04-26 11:08:11
Subject: SQL Query Timeouts
Previous:From: Antal AttilaDate: 2004-04-26 10:07:33
Subject: Own opclass and LIKE problem again!

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