Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields strange

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields strange
Дата
Msg-id 4201.1091751450@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields  (Joe Conway <mail@joeconway.com>)
Ответы Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> ... whitespace just before the delimiter is 
> significant (even though leading whitespace is not)

Yeah.  This has been the documented behavior for quite some time, but
I can't say that I ever liked it.

> I view the current behavior as a bug. While making changes, I'd like to 
> require elements with embedded whitespace to be quoted so that the above 
> does this:

> regression=# select '{0 second,0 second}'::text[];
> ERROR:  malformed array literal: "{0 second,0 second}"

> Additionally I'd like to make whitespace before and after quoted or 
> unquoted elements insignificant. Any comments?

I think that suppressing unquoted trailing whitespace is probably
reasonable.  I'm much less enthusiastic about rejecting unquoted
embedded whitespace, though.  I think that's significantly likely
to break apps, and it doesn't seem like it's really needed to have
sane behavior.  The leading/trailing whitespace asymmetry is just
weird, but it doesn't follow that embedded whitespace is weird.

If we are going to make such changes, 8.0 is the right time to do it.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: 8.0 beta status
Следующее
От: David Fetter
Дата:
Сообщение: Re: 8.0 beta status