Re: New array functions

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: New array functions
Дата
Msg-id 1062103952.3132.7.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Re: New array functions  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway kirjutas N, 28.08.2003 kell 21:15:
> Greg Stark wrote:
> > Specifically I want to know how to replace my int_array_aggregate(int) and
> > int_array_enum(_int) calls.
> 
> I have no idea what those are -- are they from contrib?
> 
> You can create an aggregate to turn arbitrary datatype elements into 
> arrays like this:
> 
> CREATE AGGREGATE array_aggregate
> (
>    BASETYPE = anyelement,
>    SFUNC = array_append,
>    STYPE = anyarray,
>    INITCOND = '{}'
> );

Any idea of performance - is this array_aggregate(anyelement) faster,
slower or about same than int_array_aggregate(int) ?

> If int_array_enum() is supposed to take '{1,2,3}' and produce three 
> rows, that function was proposed but rejected. Subsequently Peter 
> Eisentraut pointed out a SQL99 syntax that does this, but I did not get 
> it done for 7.4. Perhaps for 7.5.

So we got to keep intagg at least until 7.5 ...

-----------
Hannu



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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: Nasty problem in hash indexes
Следующее
От: Sean Chittenden
Дата:
Сообщение: [seanc@FreeBSD.org: Re: Performance tests I did with FreeBSD, Linux and PostgreSQL]