Re: "reverse()" on strings

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: "reverse()" on strings
Дата
Msg-id 200208261411.01219.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: "reverse()" on strings  (Jeff Boes <jboes@nexcerpt.com>)
Ответы Re: "reverse()" on strings  (h012@ied.com)
Список 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 BerkusAglio Database SolutionsSan Francisco



В списке pgsql-sql по дате отправления:

Предыдущее
От: Jeff Boes
Дата:
Сообщение: Re: "reverse()" on strings
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Efficient DELETE Strategies