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

From: "Tony Marston" <tony(at)marston-home(dot)demon(dot)co(dot)uk>
To: "'Peter Eisentraut'" <peter_e(at)gmx(dot)net>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #4465: GROUP BY is not to SQL standard
Date: 2008-10-15 12:47:40
Message-ID: 9330DA53AEEF4D9D974E7BE71C25B844@ajmnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Support for functional dependencies is not a feature that can be turned off
in any database engine. Dependencies, whether they are functional,
transitive, multi-valued or join dependencies, are inherent in the database
design. It is therefore nonsense to say that support for functional
dependencies is optional.

Saying that the SQL standard and Relational Theory are unconnected is
complete misdirection. The SQL standard is surely there to define how
Relational Theory can/should be implemented. A database cannot be classed as
"relational" if it does not support standard SQL, therefore the two must go
hand in hand.

The simple fact is that it is only in the 1992 standard that it states that
ALL columns in the SELECT clause must be identified in the GROUP BY clause.
In all subsequent standards it has been permissible to omit any column from
the GROUP BY clause if it is functionally dependent on any other column in
the GROUP BY clause. All you can do is point to paragraphs which are NOT
contained in the definition of the GROUP BY clause and say "this is our get
out". Now you wonder why I refer to your arguments as "weasel words".

Tony Marston

http://www.tonymarston.net
http://www.radicore.org

> -----Original Message-----
> From: Peter Eisentraut [mailto:peter_e(at)gmx(dot)net]
> Sent: 15 October 2008 11:53
> To: Tony Marston
> Cc: 'Gregory Stark'; pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] BUG #4465: GROUP BY is not to SQL standard
>
>
> Tony Marston wrote:
> > You are still missing the point - "functional dependencies"
> is not a
> > separate module that can be turned on or off with code,
>
> It is in the SQL standard.
>
> > they are inherent in
> > the database design. According to relational theory any
> non-key field
> > on a table is functionally dependent of the key of that
> table, so if
> > you support both key and non-key fields on a table then you
> > automatically support functional dependencies. How can you possibly
> > say otherwise?
>
> Again, you are confusing the SQL standard with relational
> theory, and an
> SQL standard conformance feature name with the computer science
> interpretation of that name. I suggest you read Part 1
> "Framework" of
> SQL 2003 which explains how SQL conformance works.
>
> > Where does it describe in the SQL standards EXACTLY what the term
> > "functional dependencies" means? Is it the same as in relational
> > theory, or is it something different?
>
> We are talking about feature T301, which is defined by the
> Conformance
> rules that mention it. That is all that matters. It does not matter
> what the name of that feature is.
>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nitin Saxena 2008-10-15 13:39:31 Postgres database problem
Previous Message Jussi Pakkanen 2008-10-15 11:02:56 Re: BUG #4462: Adding COUNT to query causes massive slowdown