From: h012@ied.com
To: Josh Berkus <josh@agliodbs.com>
Cc: Jeff Boes <jboes@nexcerpt.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: "reverse()" on strings
Date: Wed, 28 Aug 2002 04:07:53 -0400 (EDT)
Message-ID: <no.Yo.N.nN.0208280400360.20016-100000@business.com> (raw)
In-Reply-To: <200208261411.01219.josh@agliodbs.com>
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/
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: h012@ied.com, josh@agliodbs.com, jboes@nexcerpt.com
Subject: Re: "reverse()" on strings
In-Reply-To: <no.Yo.N.nN.0208280400360.20016-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