Skip site navigation (1) Skip section navigation (2)

Re: BUG #4465: GROUP BY is not to SQL standard

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tony Marston <tony(at)marston-home(dot)demon(dot)co(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4465: GROUP BY is not to SQL standard
Date: 2008-10-15 00:30:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Tony Marston wrote:
> I think your definition of "Feature T301 Functional Dependencies" is
> extremely questionable. A functional dependency in relational theory
> automatically exists where a non-key column on a table is functionally
> dependent on the key of that table. It is not something that can be turned
> on or off with code, it is built into the design of the table, so it is
> erroneous to say that "Postgresql does not support functional dependencies".
> If you support both key and non-key columns on a table then you support
> functional dependencies whether you like it or not.

I think you misunderstand what "Features" in the SQL standard mean. 
Surely a relational database system supports some kind of functional 
dependency system, and there is a common definition for that in the 
computer science literature (and there is yet another one in the SQL 
standard, part 2, clause 4.18).  But in the SQL standard, features 
contain conformance claims.  Your product can either conform to SQL:2003 
with T301, in which case it should behave as in 7.12 GR 15, or it can 
conform to SQL:2003 without T301, in which case it should behave as in 
7.12 CR 3.  Both of these can claim to conform to SQL, if they declare 
the details correctly.  The fact that T301 is labeled "Functional 
dependencies" is an informative label for what the feature generally 
tries to achieve, but it is not a normative description of the feature 
itself, since that is given elsewhere in the standard.

Since PostgreSQL is documented not to support feature T301, we apply 
7.12 CR 3, and no one has so far disputed that we do so incorrectly.

Now you might say, then PostgreSQL is not a real relational database 
system.  But I believe it is widely understood that no SQL 
implementation implements relational theory correctly.  That's a whole 
different can of worms.

> As for your statement that PostgreSQL has never claimed that it is fully
> SQL-compliant, every time I have posted a message to a PG newsgroup and
> compared it with MySQL the immediate response which I receive has always
> been along the lines of "don't compare PG with MySQL as that is a toy
> database that does not follow the standards". As soon as I point out an SQL
> standard that you DON'T follow I get a barrage of weasel words and pathetic
> excuses.

The level of SQL conformance as evaluated by the PostgreSQL developers 
can be found in the documentation.  If MySQL has a similar document, you 
can draw your own comparisons.  I know of no such document, but I would 
guess that MySQL is less conforming than PostgreSQL.

You should, however, not mistake the chatter of the PostgrSQL newsgroup 
mob as facts, authorative statements, or representative of the opinions 
of the project leadership.  We cannot choose the people our newsgroups 

I am sorry that you interpret my attempts to explain my reading of the 
SQL standards to you as weasel words and pathetic excuses.  If you 
cannot restrict your comments to rational arguments and have to resort 
to name-calling, then I should probably not waste any more time 
discussing with you.

In response to

pgsql-bugs by date

Next:From: Gregory StarkDate: 2008-10-15 01:56:51
Subject: Re: BUG #4465: GROUP BY is not to SQL standard
Previous:From: Bruce MomjianDate: 2008-10-15 00:28:42
Subject: Re: BUG #4465: GROUP BY is not to SQL standard

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group