Re: Annoying "split to array" function inconsistency...best way to fix?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Annoying "split to array" function inconsistency...best way to fix?
Дата
Msg-id 12249.1443394475@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Annoying "split to array" function inconsistency...best way to fix?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-docs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Two functions exists that convert "text" to "text[]"
> regexp_string_to_array(text, text [,text]) :
> http://www.postgresql.org/docs/9.4/interactive/functions-string.html
> string_to_array(text, text [, text]) :
> http://www.postgresql.org/docs/9.4/interactive/functions-array.html

> Would it be hateful to make it so that both entries appear on both tables?

> array_to_string(anyarray, text [,text]) could be lumped in with this as
> well.

> string_to_array not being on the string functions page is the more glaring
> omission for me.

I am not excited about the idea of documenting functions twice; that would
almost certainly lead to the redundant entries getting out of sync.

We could possibly decide that string_to_array and array_to_string are
primarily string functions not array functions, and just move them to
the string-functions page.

Another possibility is to just add cross-references to the
string-functions page, like the existing one for string_agg().
But I think I like the first idea better, in view of
regexp_string_to_array already being here.

            regards, tom lane


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Annoying "split to array" function inconsistency...best way to fix?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Updated docs on base backups