Re: Removing Functionally Dependent GROUP BY Columns

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing Functionally Dependent GROUP BY Columns
Date: 2015-12-03 02:17:43
Message-ID: CAKJS1f9K99+dKKs2WXzXA1BQf7X=OxVsrt7BACTohTn-E3yrHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3 December 2015 at 14:28, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> On 11/30/15 11:00 PM, David Rowley wrote:
> > It seems that there's no shortage of relational databases in existence
> > today which don't support this. These databases would require the GROUP
> > BY clause to include the p.description column too.
>
> Well, actually, we implemented this because other databases had it and
> users kept complaining to us.
>

Most likely you mean MySQL? I believe there was a bit of an influx in
people emigrating away from that database not in the too distant past. It's
not too surprising we picked up some of those people, and some of the
features that they were used to at the same time... IF NOT EXISTS perhaps
is a good example to back that up.

However, I think your comment makes it quite clear that we're not talking
about the same database management systems.

For me, I tested the most popular 2 commercial ones and found neither of
these supported columns in the SELECT list which were functionally
dependent on the GROUP BY clause, unless the columns themselves were in the
GROUP BY clause. I admit my "no shortage" comment was based on these two
only. I also admit that I don't possess any statistics which show which
RDBMSs users are migrating from. I merely thought that testing the two most
popular commercial ones was enough justification to write what I wrote.

--
David Rowley http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-12-03 02:18:43 Re: pgsql: Refactor Perl test code
Previous Message Bruce Momjian 2015-12-03 01:42:10 Re: Erroneous cost estimation for nested loop join