def check_aggregate_support(self, aggregate):
        if aggregate.sql_function in ('STDDEV_POP', 'STDDEV_SAMP', 'VAR_POP', 'VAR_SAMP'):
            if self.postgres_version[0:2] < (8,2):
                raise NotImplementedError('PostgreSQL does not support %s prior to version 8.2. Please upgrade your version of PostgreSQL.' % aggregate.sql_function)

        if aggregate.sql_function in ('STDDEV_POP', 'VAR_POP'):
            if self.postgres_version[0:2] == (8,2):
                if self.postgres_version[2] is None or self.postgres_version[2] <= 4:
                    raise NotImplementedError('PostgreSQL 8.2 to 8.2.4 is known to have a faulty implementation of %s. Please upgrade your version of PostgreSQL.' % aggregate.sql_function)
Check that the backend fully supports the provided aggregate.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/db/backends/postgresql/operations.py/DatabaseOperations.check_aggregate_support