Re: Third thoughts about the DISTINCT MAX() problem - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Third thoughts about the DISTINCT MAX() problem
Date
Msg-id 1206780853.4285.1793.camel@ebony.site
Whole thread Raw
In response to Re: Third thoughts about the DISTINCT MAX() problem  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
List pgsql-hackers
On Sat, 2008-03-29 at 07:07 +0530, Gurjeet Singh wrote:
> On Sat, Mar 29, 2008 at 3:21 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

>         regression=# select max(unique1), generate_series(1,3) as g
>         from tenk1 order by g desc;
>          max  | g
>         ------+---
>          9999 | 1
>          9999 | 2
>          9999 | 3
>         (3 rows)
>           
> 
> In the past I had seen suggestions (perhaps from you) that we should
> disallow SRFs in target list... Although not for 8.3, but would this
> be a good time for 8.4 to deprecate the usage of SRFs in targetlist?

I think it makes sense to throw an error if we have both ungrouped
aggregates and SRFs in the targetlist. The two concepts seem at odds
with each other anyhow.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com 
 PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk



pgsql-hackers by date:

Previous
From: "Gurjeet Singh"
Date:
Subject: Re: Third thoughts about the DISTINCT MAX() problem
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Implemented current_query