From: h012@ied.com
To: pgsql-sql@postgresql.org
Subject: "reverse()" on strings
Date: Mon, 26 Aug 2002 16:12:42 -0400 (EDT)
Message-ID: <no.Yo.N.nN.0208261600250.2291-100000@business.com> (raw)
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. ##
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: h012@ied.com
Subject: Re: "reverse()" on strings
In-Reply-To: <no.Yo.N.nN.0208261600250.2291-100000@business.com>
References: <no.Yo.N.nN.0208261600250.2291-100000@business.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox