Re: [HACKERS] writing new regexp functions

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: [HACKERS] writing new regexp functions
Дата
Msg-id 20070204154528.GB13202@fetter.org
обсуждение исходный текст
Ответ на Re: [HACKERS] writing new regexp functions  (Jeremy Drake <pgsql@jdrake.com>)
Ответы Re: [HACKERS] writing new regexp functions  (Jeremy Drake <pgsql@jdrake.com>)
Список pgsql-patches
On Fri, Feb 02, 2007 at 07:01:33PM -0800, Jeremy Drake wrote:

> Let me know if you see any bugs or issues with this code, and I am
> open to suggestions for further regression tests ;)

> Things that I still want to look into:
> * regexp flags (a la regexp_replace).

One more text field at the end is how the regexp_replace() one does
it.

> * maybe make regexp_matches return setof whatever, if given a 'g' flag
>   return all matches in string.

This is doable with current machinery, albeit a little clumsily.

> * maybe a join function that works as an aggregate
>    SELECT join(',', col) FROM tbl
>   currently can be written as
>    SELECT array_to_string(ARRAY(SELECT col FROM tbl), ',')

The array_accum() aggregate in the docs works OK for this purpose.

Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: TM formating patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #2221: Bad delimiters allowed in COPY ...