Re: GROUP BY DISTINCT

2021-03-18 Thread Vik Fearing
On 3/19/21 12:52 AM, Tomas Vondra wrote: > > On 3/19/21 12:26 AM, Tom Lane wrote: >> I wrote: >>> This is gcc 4.5, but hopefully whatever shuts it up will also work on 4.7. >>> I'll work on figuring that out. >> >> Actually, the problem is pretty obvious after comparing this use >> of foreach_dele

Re: GROUP BY DISTINCT

2021-03-18 Thread Tomas Vondra
On 3/19/21 12:26 AM, Tom Lane wrote: > I wrote: >> This is gcc 4.5, but hopefully whatever shuts it up will also work on 4.7. >> I'll work on figuring that out. > > Actually, the problem is pretty obvious after comparing this use > of foreach_delete_current() to every other one. I'm not sure wh

Re: GROUP BY DISTINCT

2021-03-18 Thread Tom Lane
I wrote: > This is gcc 4.5, but hopefully whatever shuts it up will also work on 4.7. > I'll work on figuring that out. Actually, the problem is pretty obvious after comparing this use of foreach_delete_current() to every other one. I'm not sure why the compiler warnings are phrased just as they

Re: GROUP BY DISTINCT

2021-03-18 Thread Tom Lane
I wrote: > Hmm ... prairiedog isn't showing the warning, but maybe gaur will. Bingo: parse_agg.c: In function 'expand_grouping_sets': parse_agg.c:1851:5: warning: value computed is not used This is gcc 4.5, but hopefully whatever shuts it up will also work on 4.7. I'll work on figuring that out.

Re: GROUP BY DISTINCT

2021-03-18 Thread Tom Lane
Thomas Munro writes: > On Fri, Mar 19, 2021 at 10:14 AM Tomas Vondra > wrote: >> Thanks for the info. So it's likely related to older gcc releases. The >> question is how to tweak the code to get rid of this ... > It's frustrating to have to do press-ups to fix a problem because a > zombie Debia

Re: GROUP BY DISTINCT

2021-03-18 Thread Thomas Munro
On Fri, Mar 19, 2021 at 10:14 AM Tomas Vondra wrote: > >> The only possibility I can think of is some sort of issue in the old-ish > >> gcc release (4.7.2). > > > > No sure what's going on there, but data points: I tried a 32 bit build > > here (that's the other special thing about lapwing) and di

Re: GROUP BY DISTINCT

2021-03-18 Thread Tomas Vondra
On 3/18/21 10:02 PM, Thomas Munro wrote: > On Fri, Mar 19, 2021 at 8:27 AM Tomas Vondra > wrote: >> Hmmm, this seems to fail on lapwing with this error: >> >> parse_agg.c: In function 'expand_grouping_sets': >> parse_agg.c:1851:23: error: value computed is not used >> [-Werror=unused-value] >>

Re: GROUP BY DISTINCT

2021-03-18 Thread Thomas Munro
On Fri, Mar 19, 2021 at 8:27 AM Tomas Vondra wrote: > Hmmm, this seems to fail on lapwing with this error: > > parse_agg.c: In function 'expand_grouping_sets': > parse_agg.c:1851:23: error: value computed is not used > [-Werror=unused-value] > cc1: all warnings being treated as errors > > That lin

Re: GROUP BY DISTINCT

2021-03-18 Thread Tomas Vondra
On 3/18/21 6:25 PM, Tomas Vondra wrote: > On 3/16/21 3:52 PM, Tomas Vondra wrote: >> >> >> On 3/16/21 9:21 AM, Vik Fearing wrote: >>> On 3/13/21 12:33 AM, Tomas Vondra wrote: Hi Vik, The patch seems quite ready, I have just two comments. >>> >>> Thanks for taking a look. >>>

Re: GROUP BY DISTINCT

2021-03-18 Thread Tomas Vondra
On 3/16/21 3:52 PM, Tomas Vondra wrote: > > > On 3/16/21 9:21 AM, Vik Fearing wrote: >> On 3/13/21 12:33 AM, Tomas Vondra wrote: >>> Hi Vik, >>> >>> The patch seems quite ready, I have just two comments. >> >> Thanks for taking a look. >> >>> 1) Shouldn't this add another for DISTINCT, somewhere

Re: GROUP BY DISTINCT

2021-03-16 Thread Tomas Vondra
On 3/16/21 9:21 AM, Vik Fearing wrote: > On 3/13/21 12:33 AM, Tomas Vondra wrote: >> Hi Vik, >> >> The patch seems quite ready, I have just two comments. > > Thanks for taking a look. > >> 1) Shouldn't this add another for DISTINCT, somewhere in the >> documentation? Now the index points just

Re: GROUP BY DISTINCT

2021-03-16 Thread Vik Fearing
On 3/13/21 12:33 AM, Tomas Vondra wrote: > Hi Vik, > > The patch seems quite ready, I have just two comments. Thanks for taking a look. > 1) Shouldn't this add another for DISTINCT, somewhere in the > documentation? Now the index points just to the SELECT DISTINCT part. Good idea; I never thin

Re: GROUP BY DISTINCT

2021-03-12 Thread Tomas Vondra
Hi Vik, The patch seems quite ready, I have just two comments. 1) Shouldn't this add another for DISTINCT, somewhere in the documentation? Now the index points just to the SELECT DISTINCT part. 2) The part in gram.y that wraps/unwraps the boolean flag as an integer, in order to stash it in the

Re: GROUP BY DISTINCT

2021-03-02 Thread Georgios
‐‐‐ Original Message ‐‐‐ On Tuesday, March 2, 2021 5:51 PM, Vik Fearing wrote: > On 3/2/21 4:06 PM, Georgios Kokolatos wrote: > > > As a minor gripe, I would note the addition of list_int_cmp. > > The block > > > > - /* Sort each groupset individually */ > > > > > > -

Re: GROUP BY DISTINCT

2021-03-02 Thread Georgios Kokolatos
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi, this is a useful feature, thank you for implementing. I gather that it f

Re: GROUP BY DISTINCT

2021-03-02 Thread Vik Fearing
On 3/2/21 4:06 PM, Georgios Kokolatos wrote: > As a minor gripe, I would note the addition of list_int_cmp. > The block > > + /* Sort each groupset individually */ > + foreach(cell, result) > + list_sort(lfirst(cell), list_int_cmp); > > Can follow

Re: GROUP BY DISTINCT

2021-02-21 Thread Vik Fearing
On 2/21/21 3:06 PM, e...@xs4all.nl wrote: >> On 2021.02.21. 13:52 Vik Fearing wrote: >> >> Attached is a patch to implement this for PostgreSQL. >> [] > > The changed line that gets stuffed into sql_features is missing a terminal > value (to fill the 'comments' column). > This line: > '+T434

Re: GROUP BY DISTINCT

2021-02-21 Thread er
> On 2021.02.21. 13:52 Vik Fearing wrote: > > Attached is a patch to implement this for PostgreSQL. > [] The changed line that gets stuffed into sql_features is missing a terminal value (to fill the 'comments' column). This line: '+T434 GROUP BY DISTINCT YES' (A tab at