Re: "reverse()" on strings

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Jeff Boes <jboes(at)nexcerpt(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: "reverse()" on strings
Date: 2002-08-26 21:11:01
Message-ID: 200208261411.01219.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2002-08-26 21:35:20 Re: Efficient DELETE Strategies
Previous Message Jeff Boes 2002-08-26 20:56:46 Re: "reverse()" on strings