Re: Implicit casts with generic arrays

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Implicit casts with generic arrays
Дата
Msg-id 162867790706060117v6b2048c0waa8ad0f9e241c1cf@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Implicit casts with generic arrays  ("Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>)
Список pgsql-hackers
>
> > For example in 8.2 this is mapped to array_prepend:
> >
> > regression=# select 'x'::text || array['aa','bb','cc'];
> >    ?column?
> > --------------
> >  {x,aa,bb,cc}
> > (1 row)
> >
> > but with the experimental code you get textcat:
> >
> > catany=# select 'x'::text || array['aa','bb','cc'];
> >   ?column?
> > -------------
> >  x{aa,bb,cc}
> > (1 row)
>
> This is what I would have expected || to give, and not what 8.2 does.
> So disregarding the rest of the argument I think that array_[pre|ap]pend
> should have other operators.
>
> Andreas
>

I thing so current behave is more intuitive and practical. Result
x{aa,bb,cc} is nonsens. Array concation have to have higher priority
than text concation.

Pavel


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

Предыдущее
От: "Zeugswetter Andreas ADI SD"
Дата:
Сообщение: Re: Implicit casts with generic arrays
Следующее
От: "Zeugswetter Andreas ADI SD"
Дата:
Сообщение: Re: TOAST usage setting