X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 0F388D1B582 for ; Mon, 26 Apr 2004 07:11:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 65401-02 for ; Mon, 26 Apr 2004 07:11:40 -0300 (ADT) Received: from vf.i-trade.hu (fw.i-trade.hu [212.92.1.62]) by svr1.postgresql.org (Postfix) with SMTP id 93D0FD1B57A for ; Mon, 26 Apr 2004 07:11:36 -0300 (ADT) Received: (qmail 22154 invoked from network); 26 Apr 2004 09:51:44 -0000 Received: from szeged-130.i-trade.hu (HELO atesz) (212.92.7.130) by 0 with SMTP; 26 Apr 2004 09:51:43 -0000 From: "Atesz" To: Subject: Own opclass and LIKE problem again! Date: Mon, 26 Apr 2004 12:11:50 +0200 Message-ID: <000101c42b76$e7125490$0b02010a@atesz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/273 X-Sequence-Number: 17648 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