Re: why there are two TargetEntrys in Query when i use "select count(catcode) from pois group by catcode"?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sunpeng <bluevaley(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: why there are two TargetEntrys in Query when i use "select count(catcode) from pois group by catcode"?
Date: 2010-05-04 20:35:36
Message-ID: 19561.1273005336@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

sunpeng <bluevaley(at)gmail(dot)com> writes:
> after i execute "select count(*) from pois group by catcode";
> the log of query.targetList is :
> why there is the second TARGETENTRY? what's the purpose of the second
> TARGETENTRY?

It's the GROUP BY expression. Note the ressortgroupref and resjunk
settings.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andre Lopes 2010-05-04 20:55:35 How to exit/abort from a function that returns VOID?
Previous Message sunpeng 2010-05-04 19:18:08 why there are two TargetEntrys in Query when i use "select count(catcode) from pois group by catcode"?