Re: count( distinct x ) - Mailing list pgsql-sql

From Tom Lane
Subject Re: count( distinct x )
Date
Msg-id 12318.975358773@sss.pgh.pa.us
Whole thread Raw
In response to Re: count( distinct x )  (Anthony <lists@a1.org.uk>)
List pgsql-sql
Anthony <lists@a1.org.uk> writes:
> I think it's time to get Mr. Sysadmin to upgrade to v7 ;)

That's a good idea on many grounds, not only this one ;-)

However, if you really need a 6.5.* solution, you could do
SELECT DISTINCT foo INTO TEMP TABLE mytemp FROM ...SELECT COUNT(*) FROM mytemp;DROP TABLE mytemp;
        regards, tom lane


pgsql-sql by date:

Previous
From: Serge Canizares
Date:
Subject: Re: a script that queries database periodically
Next
From: "Poul L. Christiansen"
Date:
Subject: Re: a script that queries database periodically