Skip site navigation (1) Skip section navigation (2)

Re: Implicit casts with generic arrays

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Implicit casts with generic arrays
Date: 2007-06-06 08:17:28
Message-ID: 162867790706060117v6b2048c0waa8ad0f9e241c1cf@mail.gmail.com (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-hackers by date

Next:From: Zeugswetter Andreas ADI SDDate: 2007-06-06 08:43:18
Subject: Re: TOAST usage setting
Previous:From: Zeugswetter Andreas ADI SDDate: 2007-06-06 07:36:41
Subject: Re: Implicit casts with generic arrays

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group