R: multiple paramters in aggregate function - Mailing list pgsql-general

From Scara Maccai
Subject R: multiple paramters in aggregate function
Date
Msg-id 258695.23223.qm@web24612.mail.ird.yahoo.com
Whole thread Raw
In response to multiple paramters in aggregate function  (Sim Zacks <sim@compulab.co.il>)
List 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 by date:

Previous
From: Scara Maccai
Date:
Subject: Re: totally different plan when using partitions + request
Next
From: PG Subscriber
Date:
Subject: difficulty running pg on XP as appl.