Re: Array behavior oddities

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Array behavior oddities
Дата
Msg-id 24814.1200414847@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Array behavior oddities  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Here's something else which confused me just now. Why does the second query
> return NULL instead of an array slice?

Because it isn't a slice expression --- you used colon nowhere, so the
result type is going to be text not text[].  (Remember that the parser
must determine the expression's result type at parse time, so whether
there are enough subscripts can't enter into this.)  Our alternatives
here are to throw a subscripting error or return NULL.  I'd personally
have gone with throwing an error, I think, but it seems far too late to
revisit that decision.
        regards, tom lane


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

Предыдущее
От: Gavin Sherry
Дата:
Сообщение: Re: Declarative partitioning grammar
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Declarative partitioning grammar