Search Postgresql Archives

Re: SQL question re aggregates & joins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scott Ribe <scott_ribe@xxxxxxxxxxxxxxx> writes:
> Given that t2.id is the primary key, grouping by any other column of t2 is
> really redundant. I know *what* SQL won't allow me to do, I'm interested in
> knowing if there's some reason *why* other than historical...

SQL92 says so.  More recent versions of the SQL spec describe allowing
omission of grouping columns when one of them can be proven unique,
but it's complicated and we haven't got round to doing it.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux