Re: "reverse()" on strings

From: h012(at)ied(dot)com
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Jeff Boes <jboes(at)nexcerpt(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: "reverse()" on strings
Date: 2002-08-28 08:07:53
Message-ID: no.Yo.N.nN.0208280400360.20016-100000@business.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jeff & Josh, thanks for showing me a solution !

John

PS: just curious: is there anything I can do to affect effectiveness of
the cache, when ISCACHABLE is used ? (I.e. size / expiring algorithm, or
order of inputs - E.g. when building the index, is there anything that
would order the inputs first, to maximize cache hit/miss ratio, such as
"CREATE INDEX extension_idx ON file (reverse(name)) ORDER BY name" ?

On Mon, 26 Aug 2002, Josh Berkus wrote:

> Jeff, h012,
>
> > CREATE FUNCTION fn_strrev(text) returns text as '
> > return reverse($_[0])
> > ' language 'plperl' with (iscachable);
>
> If you make that "WITH (ISCACHABLE, ISSTRICT)" the index will be faster to
> update on columns which contain large numbers of NULLs. "ISSTRICT" refers to
> the fact that if the function receives a NULL, it will output a NULL, and
> thus saves the parser the time running NULLs through the function.
>
> Also, remember to use this index, you'll have to call the exact same function
> in your queries.
>
>

--
-- Gospel of Jesus is the saving power of God for all who believe --
## To some, nothing is impossible. ##
http://Honza.Vicherek.com/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Roger Mathis 2002-08-28 08:09:48 signed/unsigned integers
Previous Message postmaster 2002-08-28 08:03:20 VIRUS IN MAIL FOR YOU FROM <jdickso5@utk.edu >