From: | h012(at)ied(dot)com |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | "reverse()" on strings |
Date: | 2002-08-26 20:12:42 |
Message-ID: | no.Yo.N.nN.0208261600250.2291-100000@business.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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. ##
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Boes | 2002-08-26 20:56:46 | Re: "reverse()" on strings |
Previous Message | Bruce Momjian | 2002-08-26 19:54:48 | Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1? |