Re: Creating Aggregate functions in PLpgSQL

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: PGSQL <pgsql-general(at)postgresql(dot)org>, Martin Gainty <mgainty(at)hotmail(dot)com>
Subject: Re: Creating Aggregate functions in PLpgSQL
Date: 2007-12-12 13:57:48
Message-ID: 479563.62098.qm@web31807.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--- On Wed, 12/12/07, Martin Gainty <mgainty(at)hotmail(dot)com> wrote:

> MG>what is Xcomp?
I really meant x component = effective component of power as opposed to the reactive component of power.

> MG>set on stun?
:o) I guess a better way to describe the problem is that total power has both a real and imaginary component. So in this way it can be liked to a complex numeric value.

> MG>assume Motor Control Cubical?
correct.

There is a power distribution hierarchy that they would like to analyze.

1) the average pF of all motor in a Motor Control Center (MCC).
2) the average pF of all MCCs that are fed from a Load Center (LC).
3) the average pF of all LC that are fed from the facility main feed.

The pF is measured between 0 and 1. 1 being purely effective power and 0 being purge reactive power. The EEs want to identify MCCs or LCs that may need Capacitor banks to help offset the effective of reactive power inherent in the inductive load of motors.

This is a perfect problem for a custom aggregate.

Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2007-12-12 13:58:52 Re: executing a procedure with delay
Previous Message Richard Huxton 2007-12-12 13:49:56 Re: Multiple clusters on one box for PITR