From: Josh Berkus <josh@agliodbs.com>
To: Jeff Boes <jboes@nexcerpt.com>
To: pgsql-sql@postgresql.org
Subject: Re: "reverse()" on strings
Date: Mon, 26 Aug 2002 14:11:01 -0700
Message-ID: <200208261411.01219.josh@agliodbs.com> (raw)
In-Reply-To: <ake4lb$20ed$1@news.hub.org>
References: <no.Yo.N.nN.0208261600250.2291-100000@business.com>
<ake4lb$20ed$1@news.hub.org>
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.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
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: josh@agliodbs.com, jboes@nexcerpt.com
Subject: Re: "reverse()" on strings
In-Reply-To: <200208261411.01219.josh@agliodbs.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