R: multiple paramters in aggregate function

Поиск
Список
Период
Сортировка
От Scara Maccai
Тема R: multiple paramters in aggregate function
Дата
Msg-id 258695.23223.qm@web24612.mail.ird.yahoo.com
обсуждение исходный текст
Ответ на multiple paramters in aggregate function  (Sim Zacks <sim@compulab.co.il>)
Список pgsql-general
> Is there a better way?

I think you could use a User Data Type.
Then pass that as parameter to your aggregate function.

That is: you would pass

(4, 'meter')

(400,  'mm')

(100, 'cm')

to your aggregate function.

Each one is a user datatype:

CREATE TYPE mytype AS (
    v       double precision,
    t       varchar(10)
);

See

http://www.postgresql.org/docs/8.4/static/rowtypes.html

This is the example based on a custom data type of complex numbers:

http://www.postgresql.org/docs/8.4/static/xaggr.html





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

Предыдущее
От: Scara Maccai
Дата:
Сообщение: Re: totally different plan when using partitions + request
Следующее
От: PG Subscriber
Дата:
Сообщение: difficulty running pg on XP as appl.