Re: Creating Aggregate functions in PLpgSQL

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Creating Aggregate functions in PLpgSQL
Дата
Msg-id 648991.26402.qm@web31806.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: Creating Aggregate functions in PLpgSQL  ("Matthew Dennis" <mdennis@merfer.net>)
Список pgsql-general
--- On Tue, 12/11/07, Matthew Dennis <mdennis@merfer.net> wrote:

> 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
theaverage power factor(scalar) of a Motor Control Center (among other things).  The Electrical Engineers that are
askingfor 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 finding the angle between Xcomp/hypotenuse after having used
Pythagoreantheorem to find the hypotenuse after having summing of multiple 2 coordinate vectors(the EEs use the term
phasers)for each MCC 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
thisone done first. 

Anyway thank for the push in the right direction!

Regards,
Richard Broersma Jr.

Anyway

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

Предыдущее
От: "D. Dante Lorenso"
Дата:
Сообщение: Function to convert from TEXT to BYTEA?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Creating Aggregate functions in PLpgSQL