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 4A414D1B577 for ; Mon, 26 Apr 2004 07:07:21 -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 61521-05 for ; Mon, 26 Apr 2004 07:07:20 -0300 (ADT) Received: from vf.i-trade.hu (fw.i-trade.hu [212.92.1.62]) by svr1.postgresql.org (Postfix) with SMTP id 99D31D1B57B for ; Mon, 26 Apr 2004 07:07:16 -0300 (ADT) Received: (qmail 14617 invoked from network); 26 Apr 2004 09:47:22 -0000 Received: from szeged-130.i-trade.hu (HELO atesz) (212.92.7.130) by 0 with SMTP; 26 Apr 2004 09:47:21 -0000 From: "Antal Attila" To: Subject: Own opclass and LIKE problem again! Date: Mon, 26 Apr 2004 12:07:33 +0200 Message-ID: <000001c42b76$4ace0ed0$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/279 X-Sequence-Number: 17654 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