Re: Do we need multiple forms of the SQL2003 statistics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
Subject: Re: Do we need multiple forms of the SQL2003 statistics
Date: 2006-07-29 23:30:42
Message-ID: 20724.1154215842@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2006-07-30 01:14:16 New variable server_version_num
Previous Message Tom Lane 2006-07-29 23:05:13 Re: [HACKERS] putting CHECK_FOR_INTERRUPTS in