Re: CREATE AGGREGATE array_cat

2020-11-18 Thread Andres Freund
Hi, On 2020-11-18 19:54:52 -0500, Chapman Flack wrote: > On 11/18/20 19:46, David G. Johnston wrote: > > > I doubt there is any substantial resistance to including such a function > > but it would have to be written in C. > > Would anything have to be written at all, save the CREATE AGGREGATE >

Re: CREATE AGGREGATE array_cat

2020-11-18 Thread Tom Lane
Vik Fearing writes: > On 11/19/20 1:54 AM, Chapman Flack wrote: >> Would anything have to be written at all, save the CREATE AGGREGATE >> suggested in the original message, using the existing array_cat as the >> state transition function? > Nope. As my example showed. But by the same token, any

Re: CREATE AGGREGATE array_cat

2020-11-18 Thread Vik Fearing
On 11/19/20 1:54 AM, Chapman Flack wrote: > On 11/18/20 19:46, David G. Johnston wrote: > >> I doubt there is any substantial resistance to including such a function >> but it would have to be written in C. > > Would anything have to be written at all, save the CREATE AGGREGATE > suggested in the

Re: CREATE AGGREGATE array_cat

2020-11-18 Thread David G. Johnston
On Wed, Nov 18, 2020 at 5:54 PM Chapman Flack wrote: > On 11/18/20 19:46, David G. Johnston wrote: > > > I doubt there is any substantial resistance to including such a function > > but it would have to be written in C. > > Would anything have to be written at all, save the CREATE AGGREGATE > sug

Re: CREATE AGGREGATE array_cat

2020-11-18 Thread Chapman Flack
On 11/18/20 19:46, David G. Johnston wrote: > I doubt there is any substantial resistance to including such a function > but it would have to be written in C. Would anything have to be written at all, save the CREATE AGGREGATE suggested in the original message, using the existing array_cat as the

Re: CREATE AGGREGATE array_cat

2020-11-18 Thread David G. Johnston
On Wed, Nov 18, 2020 at 5:37 PM Vik Fearing wrote: > On 11/18/20 11:19 PM, David G. Johnston wrote: > > On Wednesday, November 18, 2020, Vlad Bokov wrote: > > > >> Hi, I wonder why there's no function to aggregate arrays by > >> concatenation out of the box? > >> > > > > See array_agg(...) > > >

Re: CREATE AGGREGATE array_cat

2020-11-18 Thread Vik Fearing
On 11/18/20 11:19 PM, David G. Johnston wrote: > On Wednesday, November 18, 2020, Vlad Bokov wrote: > >> Hi, I wonder why there's no function to aggregate arrays by >> concatenation out of the box? >> > > See array_agg(...) Why? That doesn't do what is wanted. vik=# select array_agg(a) from

Re: CREATE AGGREGATE array_cat

2020-11-18 Thread David G. Johnston
On Wednesday, November 18, 2020, Vlad Bokov wrote: > Hi, I wonder why there's no function to aggregate arrays by > concatenation out of the box? > See array_agg(...) David J.