X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DA1AC32AE59 for ; Thu, 21 Oct 2004 06:45:14 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71154-02 for ; Thu, 21 Oct 2004 05:45:09 +0000 (GMT) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by svr1.postgresql.org (Postfix) with ESMTP id EAA3E32AE41 for ; Thu, 21 Oct 2004 06:44:56 +0100 (BST) Received: from mail.ge-ts.com.hk (unknown [202.66.115.131]) by svr4.postgresql.org (Postfix) with ESMTP id B08555AF5D5 for ; Thu, 21 Oct 2004 03:40:56 +0000 (GMT) Received: from raysiu ([172.16.96.15]) by mail.ge-ts.com.hk (8.12.8/8.12.8) with SMTP id i9L3bPCh013589; Thu, 21 Oct 2004 11:37:26 +0800 Message-ID: <078b01c4b71f$4936e4e0$0f6010ac@raysiu> From: "Ray" To: "Rosser Schwarz" Cc: References: <069201c4b715$34851670$0f6010ac@raysiu> <37d451f704102020346fdbb855@mail.gmail.com> Subject: Re: create index with substr function Date: Thu, 21 Oct 2004 11:37:26 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/338 X-Sequence-Number: 8814 sorry it doesn't works, as my postgres is 7.3 not 7.4. any other alternative solution for version after 7.4?? Thank Ray : ) ----- Original Message ----- From: "Rosser Schwarz" To: "Ray" Cc: Sent: Thursday, October 21, 2004 11:34 AM Subject: Re: [PERFORM] create index with substr function > while you weren't looking, Ray wrote: > > > CREATE INDEX idx_doc_substr_doc_urn ON doc USING btree (SUBSTR(doc_urn,10)); > > CREATE INDEX idx_doc_substr_doc_urn ON doc USING btree ((SUBSTR(doc_urn,10))); > > You need an additional set of parens around the SUBSTR() call. > > /rls > > -- > :wq >