Re: count function alternative in postgres

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Scott Bailey <artacus(at)comcast(dot)net>, junaid malik <junaidmalik14(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: count function alternative in postgres
Date: 2010-04-05 18:47:06
Message-ID: 14131.1270493226@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> On Sat, Apr 3, 2010 at 3:02 PM, Scott Bailey <artacus(at)comcast(dot)net> wrote:
>> SELECT COUNT( DISTINCT row(col1, col2, col3) ) FROM foo

> very clever! This is similar to how I use rowtypes to get around the
> single column restrictions on function calls in the select field list.

Cute, but note it will only work in 8.4 or later ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Heine Ferreira 2010-04-05 18:52:01 windows 7 compatiblity?
Previous Message Merlin Moncure 2010-04-05 18:19:51 Re: count function alternative in postgres