Re: #10290: grouping with extra selects produces invalid SQL

2009-02-19 Thread Ian Kelly
On Wed, Feb 18, 2009 at 11:53 PM, Malcolm Tredinnick wrote: > Any particular grounds for doing something spec-compliant feeling > fragile to you, Ian? Having let this bounce around for 24 hours, I can't > think of a strong reason not to do it. Only the hazards of copying an arbitrary select expr

Re: #10290: grouping with extra selects produces invalid SQL

2009-02-18 Thread Malcolm Tredinnick
On Tue, 2009-02-17 at 18:15 -0700, Ian Kelly wrote: > On Tue, Feb 17, 2009 at 5:54 PM, Malcolm Tredinnick > wrote: > > > > Hi Ian, > > > > On Tue, 2009-02-17 at 16:05 -0700, Ian Kelly wrote: > > [...] > >> The solution that I'm proposing is to use the extra select expression > >> itself in the gr

Re: #10290: grouping with extra selects produces invalid SQL

2009-02-17 Thread Ian Kelly
On Tue, Feb 17, 2009 at 5:54 PM, Malcolm Tredinnick wrote: > > Hi Ian, > > On Tue, 2009-02-17 at 16:05 -0700, Ian Kelly wrote: > [...] >> The solution that I'm proposing is to use the extra select expression >> itself in the group by, rather than the alias. This passes the tests >> across all fo

Re: #10290: grouping with extra selects produces invalid SQL

2009-02-17 Thread Malcolm Tredinnick
Hi Ian, On Tue, 2009-02-17 at 16:05 -0700, Ian Kelly wrote: [...] > The solution that I'm proposing is to use the extra select expression > itself in the group by, rather than the alias. This passes the tests > across all four included backends, and seems to work in general as > long as the expr

Re: #10290: grouping with extra selects produces invalid SQL

2009-02-17 Thread Ian Kelly
On Tue, Feb 17, 2009 at 5:01 PM, Russell Keith-Magee wrote: > Out of interest - where does Oracle fall on this one? Can you use > aliases in a HAVING or ORDER BY? Oracle only allows aliases in the ORDER BY clause. > >> If there are no concerns or potential gotchas with this approach, then >> I'

Re: #10290: grouping with extra selects produces invalid SQL

2009-02-17 Thread Russell Keith-Magee
On Wed, Feb 18, 2009 at 8:05 AM, Ian Kelly wrote: > > I'd like to request some extra sets of eyes for the patch in ticket #10290. > > The summary: from r9838 on, I'm getting aggregation_regress test > failures in Oracle, apparently because annotations with extra selects > are adding the extra sel

Re: #10290: grouping with extra selects produces invalid SQL

2009-02-17 Thread Alex Gaynor
On Tue, Feb 17, 2009 at 6:05 PM, Ian Kelly wrote: > > I'd like to request some extra sets of eyes for the patch in ticket #10290. > > The summary: from r9838 on, I'm getting aggregation_regress test > failures in Oracle, apparently because annotations with extra selects > are adding the extra sel

#10290: grouping with extra selects produces invalid SQL

2009-02-17 Thread Ian Kelly
I'd like to request some extra sets of eyes for the patch in ticket #10290. The summary: from r9838 on, I'm getting aggregation_regress test failures in Oracle, apparently because annotations with extra selects are adding the extra select aliases into the group by list. This produces invalid SQL