Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 456A74759E8 for ; Mon, 26 Aug 2002 16:13:39 -0400 (EDT) Received: from ferda.ied.com (xtreme10-98.aci.on.ca [209.50.81.98]) by postgresql.org (Postfix) with ESMTP id 3C52B4758F8 for ; Mon, 26 Aug 2002 16:13:38 -0400 (EDT) Received: from [127.0.0.2] (localhost.localdomain [127.0.0.1]) by ferda.ied.com (8.11.6/8.11.6) with ESMTP id g7QKCg715395 for ; Mon, 26 Aug 2002 16:12:43 -0400 Date: Mon, 26 Aug 2002 16:12:42 -0400 (EDT) From: h012@ied.com To: pgsql-sql@postgresql.org Subject: "reverse()" on strings Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/357 X-Sequence-Number: 9203 Hi, CREATE TABLE file (name varchar(255)); I have a couple of milion filenames. I need to build index based on extensions. A couple of possibilities come to mind: CREATE INDEX extension_idx ON file (reverse(name)); -- but I didn't find a function called "reverse" CREATE INDEX extension_idx ON file (regex_match( '.*(\.[^\.]*)$' ); -- but I didn't find a function called "regex_match" which would return string matched in brackets () Any ideas ? Help ? Hints ? Thanks in advance ! John PS: if there is reverse on strings -- where could I find "reverse()" on arrays ? - thx -- -- Gospel of Jesus is the saving power of God for all who believe -- ## To some, nothing is impossible. ##