Re: string_to_array with an empty input string - Mailing list pgsql-hackers

From Tom Lane
Subject Re: string_to_array with an empty input string
Date
Msg-id 5183.1281537683@sss.pgh.pa.us
Whole thread Raw
In response to Re: string_to_array with an empty input string  (Greg Stark <gsstark@mit.edu>)
Responses Re: string_to_array with an empty input string  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> There's already been one rather-long thread on this topic.
> http://thread.gmane.org/gmane.comp.db.postgresql.general/121450

> In there I argue for the empty array interpretation and Tom goes back
> and forth a few times. I'm not sure where that thread ended though.

I had forgotten that discussion.  It looks like we trailed off without
any real consensus: there was about equal sentiment for an array with
zero elements and an array with one empty-string element.  We ended
up leaving it alone because (a) that wouldn't break anything and (b)
you could use COALESCE() to substitute whichever behavior your
application needed for the case.

So maybe we need to revisit the issue.  Pavel was claiming that
switching to a zero-element array result was a no-brainer, but evidently
it isn't so.  Is anybody still excited about the alternatives?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: RecordTransactionCommit() and SharedInvalidationMessages
Next
From: Simon Riggs
Date:
Subject: Re: MERGE command for inheritance