Why couldn't an RDBMS such as postgres interpret a SELECT that omits the GROUP
BY as implicitly grouping by all the columns that aren't part of an aggregate?

If I do this, Postgres throws an exception that I cannot SELECT a series of
columns including an aggregate without a corresponding GROUP BY clause. But it
knew to throw the error, right?  It must have some method of knowing which
columns aren't part of an aggregate.  Or is it that a column might not have an
aggregate, but still be hard to figure out how to group by it? 

But how would that happen?

If I omit something from GROUP BY, it throws another exception. If I put
something there that doesn't belong, I get a different exception. So it already
knows how to do this! :P
-- 
Regards,
Ryan Delaney
ryan.dela...@gmail.com
https://github.com/rpdelaney
GPG ID: 4096R/311C 10F2 26E0 14E3 8BA4  3B06 B634 36F1 C9E7 771B

Attachment: pgpf40ct7rNnz.pgp
Description: PGP signature

Reply via email to