On Fri, Dec 26, 2008 at 07:13:48PM -0500, Tom Lane wrote:
> Ivan Sergio Borgonovo writes:
> >>> David Fetter wrote:
> In 8.4, you'll be able to do:
>
> WITH d AS (
> SELECT DISTINCT c1, c2 FROM table1
> )
> SELECT count(*) FROM d;
>
> >>> Nice, but what will be the diff
Ivan Sergio Borgonovo writes:
>>> David Fetter wrote:
In 8.4, you'll be able to do:
WITH d AS (
SELECT DISTINCT c1, c2 FROM table1
)
SELECT count(*) FROM d;
>>> Nice, but what will be the difference from
>>> select count(*) from (select distinct c1, c2 from t);
>>> ?
>>
On Fri, 26 Dec 2008 12:04:48 -0800
David Fetter wrote:
> On Fri, Dec 26, 2008 at 08:03:30PM +0100, Ivan Sergio Borgonovo
> wrote:
> > > > aggregate_name (DISTINCT expression [, expression] )
> > > In 8.4, you'll be able to do:
> > > WITH d AS (
> > > SELECT DISTINCT c1, c2 FROM table1
> >