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

Поиск
Список
Период
Сортировка
От Tony Marston
Тема Re: BUG #4465: GROUP BY is not to SQL standard
Дата
Msg-id 9330DA53AEEF4D9D974E7BE71C25B844@ajmnotebook
обсуждение исходный текст
Ответ на Re: BUG #4465: GROUP BY is not to SQL standard  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: BUG #4465: GROUP BY is not to SQL standard  (Andrew Sullivan <ajs@commandprompt.com>)
Re: BUG #4465: GROUP BY is not to SQL standard  (Craig Ringer <craig@postnewspapers.com.au>)
Список 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".=20

Tony Marston

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



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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Jussi Pakkanen"
Дата:
Сообщение: Re: BUG #4462: Adding COUNT to query causes massive slowdown
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: BUG #4465: GROUP BY is not to SQL standard