Skip site navigation (1) Skip section navigation (2)

variance aggregates per SQL:2003

From: Neil Conway <neilc(at)samurai(dot)com>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: variance aggregates per SQL:2003
Date: 2006-03-07 22:54:00
Message-ID: 1141772040.20504.5.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-patches
This patch implements some new aggregate functions defined by SQL2003:
stddev_pop(), stddev_samp(), var_pop(), and var_samp(). stddev_samp()
and var_samp() are identical to the existing stddev() and variance()
aggregates, so I've made the latter aliases for the former.

I noticed that SQL2003 does not allow DISTINCT to be specified for these
aggregate functions. I can't really see the rationale for this
restriction, and it would be fairly ugly to implement as far as I can
tell. Thoughts?

-Neil


Attachment: variance_aggs-2.patch
Description: text/x-patch (34.2 KB)

Responses

pgsql-patches by date

Next:From: Mark KirkwoodDate: 2006-03-07 23:24:22
Subject: Re: pg_freespacemap question
Previous:From: Alvaro HerreraDate: 2006-03-07 22:28:40
Subject: Re: CREATE SYNONYM ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group