Re: array functions - request for opinions (was Re: [PATCHES] array

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: array functions - request for opinions (was Re: [PATCHES] array
Date: 2003-05-26 16:22:47
Message-ID: 2014.1053966167@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joe Conway <mail(at)joeconway(dot)com> writes:
> How can you create an aggregate using an operator as a transition function?

You'd have to reference the underlying function. I think what Peter is
really asking is whether the implementation function for || will serve
for this purpose, rather than making an additional one.

> Also (I suppose you could argue this should be fixed, but anyway...),
> you can't currently add elements to an empty array.

That particular manifestation is not relevant; I think you mean this
one:

regression=# select '{}'::int4[] || 2;
ERROR: Arrays greater than one-dimension are not supported

In both cases I think it's mostly a matter of defining a defensible
behavior, which is probably not that hard, but no one's yet gotten
annoyed enough to try to fix it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-05-26 16:32:12 Re: array functions - request for opinions (was Re: [PATCHES]
Previous Message Joe Conway 2003-05-26 16:13:55 Re: array functions - request for opinions (was Re: [PATCHES]