On Mon, 26 Aug 2002 16:13:44 -0400, h012 wrote:
> 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 ()
>
You probably want to do a
$ createlang plperl
and then something like this:
CREATE FUNCTION fn_strrev(text) returns text as '
return reverse($_[0])
' language 'plperl' with (iscachable);
The same approach can be used to provide a regex match with Perl syntax,
but I don't have an example of that coded up and at hand.
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com ...Nexcerpt... Extend your Expertise