Re: Do we need multiple forms of the SQL2003 statistics - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Do we need multiple forms of the SQL2003 statistics
Date
Msg-id 20724.1154215842@sss.pgh.pa.us
Whole thread Raw
In response to Re: Do we need multiple forms of the SQL2003 statistics  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Do we need multiple forms of the SQL2003 statistics  ("Sergey E. Koposov" <math@sai.msu.ru>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> ... From a mathematician's point of view, however, some of these 
> functions normally produce irrational numbers anyway, so it seems 
> unlikely that numeric will be useful.  But looking at the definition 
> of, say, regr_avgx(Y, X), if all the input values are integers, it 
> might be useful if I could get an exact integer or rational number as 
> output, instead of a float, that is.

The question is whether this is useful enough to justify adding a
thousand lines to numeric.c.

I believe also that the numeric forms of the aggregates will be
enormously slower than the float forms, at least on most modern
machines with decent floating-point performance.  I don't have time
to do any performance testing though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in
Next
From: Joe Conway
Date:
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]