"reverse()" on strings - Mailing list pgsql-sql

From h012@ied.com
Subject "reverse()" on strings
Date
Msg-id no.Yo.N.nN.0208261600250.2291-100000@business.com
Whole thread Raw
List pgsql-sql
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.
##



pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?
Next
From: Jeff Boes
Date:
Subject: Re: "reverse()" on strings