Re: array support patch phase 1 patch - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: array support patch phase 1 patch
Date
Msg-id Pine.LNX.4.44.0305251205410.1897-100000@peter.localdomain
Whole thread Raw
In response to array support patch phase 1 patch  (Joe Conway <mail@joeconway.com>)
Responses Re: array support patch phase 1 patch  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
Joe Conway writes:

> I personally don't understand why we should hide them from users. If I
> prefer to use array_append(var1, var2) rather than (var1 || var2),
> what's the problem? Its a matter of taste as to which is better.

The problem is that this approach leads to bloat without bound.  Maybe
tomorrow someone prefers append_array(var1, var2) or var1 + var2.  The
standard says it's var1 || var2, there is no technical or substantial
aesthetical argument against it, so that's what we should use.

> And in any case, array_accum() is intended to be used for building
> custom aggregates, so that needs to be documented.

Can you give an example of an aggregate or a class of aggregates where
this would be useful?

--
Peter Eisentraut   peter_e@gmx.net


pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: array support patch phase 1 patch
Next
From: Jan Wieck
Date:
Subject: Re: updated win32 patch