Re: Creating Aggregate functions in PLpgSQL

From: "Martin Gainty" <mgainty(at)hotmail(dot)com>
To: "Richard Broersma Jr" <rabroersma(at)yahoo(dot)com>, "PGSQL" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Creating Aggregate functions in PLpgSQL
Date: 2007-12-12 13:32:05
Message-ID: BAY108-DAV12A8145D07B920582833C5AE650@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

MG>obligatory toppost

> > http://www.postgresql.org/docs/8.3/static/sql-createaggregate.html
> > is for
> > 8.3 where there were some changes to the number of
> > arguments an aggregate
> > could take. I believe it's also more descriptive
> > documentation.
> >
> > of course for things like average you wouldn't need a
> > custom type...
>
> Thanks for the information it is very useful. The reason that I ask, is
that I am trying to develop a way to calculate the average power
factor(scalar) of a Motor Control Center (among other things). The
Electrical Engineers that are asking for the report introduced me to a
rather complicated formula to implement in standard SQL.
>
> The best way that I can describe the problem get the PF Is this Picofarad
or PetaFarad?

is finding the angle between Xcomp
MG>what is Xcomp?

/hypotenuse after having used Pythagorean theorem to find the hypotenuse
after having summing of multiple 2 coordinate vectors(the EEs use the term
phasers)
MG>set on stun?

for each MCC cubical.
MG>assume Motor Control Cubical?

>
> It seems they have need for quite a few other little aggregate functions
that they would like me to make if I can get this one done first.
>
> Anyway thank for the push in the right direction!
>
> Regards,
> Richard Broersma Jr.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas H. 2007-12-12 13:33:40 Re: Killing a session in windows
Previous Message Ashish Karalkar 2007-12-12 13:21:32 Re: very slow query