public inbox for [email protected]  
help / color / mirror / Atom feed
Annoying "split to array" function inconsistency...best way to fix?
2+ messages / 2 participants
[nested] [flat]

* Annoying "split to array" function inconsistency...best way to fix?
@ 2015-09-27 14:49  David G. Johnston <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: David G. Johnston @ 2015-09-27 14:49 UTC (permalink / raw)
  To: pgsql-docs

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.

David J.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Annoying "split to array" function inconsistency...best way to fix?
@ 2015-09-27 22:54  Tom Lane <[email protected]>
  parent: David G. Johnston <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-09-27 22:54 UTC (permalink / raw)
  To: David G. Johnston <[email protected]>; +Cc: pgsql-docs

"David G. Johnston" <[email protected]> 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


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-09-27 22:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-09-27 14:49 Annoying "split to array" function inconsistency...best way to fix? David G. Johnston <[email protected]>
2015-09-27 22:54 ` Tom Lane <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox