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

From Tom Lane
Subject Re: why there are two TargetEntrys in Query when i use "select count(catcode) from pois group by catcode"?
Date
Msg-id 19561.1273005336@sss.pgh.pa.us
Whole thread Raw
In response to why there are two TargetEntrys in Query when i use "select count(catcode) from pois group by catcode"?  (sunpeng <bluevaley@gmail.com>)
List pgsql-general
sunpeng <bluevaley@gmail.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

pgsql-general by date:

Previous
From: sunpeng
Date:
Subject: why there are two TargetEntrys in Query when i use "select count(catcode) from pois group by catcode"?
Next
From: Andre Lopes
Date:
Subject: How to exit/abort from a function that returns VOID?