Greg Stark wrote:
Anthony Molinaro [EMAIL PROTECTED] writes:
Greg,
You'll have to pardon me...
I saw this comment:
I don't see why you think people stumble on this by accident.
I think it's actually an extremely common need.
Which, if referring to the ability to have items in the
Anthony Molinaro [EMAIL PROTECTED] writes:
More awkward? What *you're* suggesting is more awkward. You realize that
right? How can syntax that is understood and accepted for years be more
awkward?
Well gosh, I would say that that's something only a newbie could say about
SQL of all things...
Schumeyer;
pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
Anthony Molinaro [EMAIL PROTECTED] writes:
More awkward? What *you're* suggesting is more awkward. You realize
that
right? How can syntax that is understood and accepted for years be
more
awkward
On Thu, Oct 13, 2005 at 12:24:55AM -0400, Greg Stark wrote:
Well the constants and the like are precisely the point. There
are plenty of cases where adding the column to the GROUP BY is
unnecessary and since Postgres makes no attempt to prune them out,
inefficient.
But inefficient pruning is
On Wed, 2005-10-12 at 20:13, Greg Stark wrote:
Scott Marlowe [EMAIL PROTECTED] writes:
Hehe. When I turn on my windshield wipers and my airbag deploys, is it
a documented feature if the dealership told me about this behaviour
ahead of time?
Well it's more like my car where the
Scott Marlowe [EMAIL PROTECTED] writes:
Sorry, but it's worse than that. It is quite possible that two people
could run this query at the same time and get different data from the
same set and the same point in time. That shouldn't happen accidentally
in SQL, you should know it's coming.
On Thu, 2005-10-13 at 13:26, Greg Stark wrote:
Scott Marlowe [EMAIL PROTECTED] writes:
Sorry, but it's worse than that. It is quite possible that two people
could run this query at the same time and get different data from the
same set and the same point in time. That shouldn't happen
On Thu, Oct 13, 2005 at 02:26:58PM -0400, Greg Stark wrote:
Scott Marlowe [EMAIL PROTECTED] writes:
could run this query at the same time and get different data from the
same set and the same point in time.
I'm pretty unsympathetic to the we should make a language less powerful and
more
: Greg Stark; Stephan Szabo; Rick Schumeyer; pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
Scott Marlowe [EMAIL PROTECTED] writes:
Sorry, but it's worse than that. It is quite possible that two people
could run this query at the same time and get different
In standard SQL you have to
write GROUP BY ... and list every single column you need from the master
table.
This thread seems to have gone off on a tangent that depends on the
assumption that the above is a correct statement. It's not. It *was*
true, in SQL92, but SQL99 lets you omit
; Stephan Szabo; Rick Schumeyer; pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
In standard SQL you have to
write GROUP BY ... and list every single column you need from the
master
table.
This thread seems to have gone off on a tangent that depends
Anthony Molinaro [EMAIL PROTECTED] writes:
An additional gripe is that this isn't a good feature (standard or not).
Oracle doesn't do it. Db2 doesn't do it.
You sure about that? It's hard to believe that the SQL committee would
put a feature into the spec that neither Oracle nor IBM intended
:[EMAIL PROTECTED]
Sent: Thursday, October 13, 2005 3:17 PM
To: Anthony Molinaro
Cc: Scott Marlowe; Greg Stark; Stephan Szabo; Rick Schumeyer;
pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
Anthony Molinaro [EMAIL PROTECTED] writes:
An additional gripe
Stephan Szabo [EMAIL PROTECTED] writes:
On Tue, 11 Oct 2005, Rick Schumeyer wrote:
I'm not sure what I was thinking, but I tried the following query in pg:
SELECT * FROM t GROUP BY state;
pg returns an error.
Mysql, OTOH, returns the first row for each state. (The first row with
On Wed, 2005-10-12 at 16:54, Greg Stark wrote:
Stephan Szabo [EMAIL PROTECTED] writes:
On Tue, 11 Oct 2005, Rick Schumeyer wrote:
I'm not sure what I was thinking, but I tried the following query in pg:
SELECT * FROM t GROUP BY state;
pg returns an error.
Mysql, OTOH,
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott Marlowe
Sent: Wednesday, October 12, 2005 6:25 PM
To: Greg Stark
Cc: Stephan Szabo; Rick Schumeyer; pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
On Wed, 2005-10-12
Scott Marlowe [EMAIL PROTECTED] writes:
Hehe. When I turn on my windshield wipers and my airbag deploys, is it
a documented feature if the dealership told me about this behaviour
ahead of time?
Well it's more like my car where the dashboard dims when I turn on my
headlights which annoys me
Greg Stark [EMAIL PROTECTED] writes:
I think most MySQL users don't stumble on it, they learn it as the way
to handle the common use case when you join a master table against a
detail table and then want to aggregate all the detail records. In
standard SQL you have to write GROUP BY ... and
]
[mailto:[EMAIL PROTECTED] On Behalf Of Greg Stark
Sent: Wednesday, October 12, 2005 9:13 PM
To: Scott Marlowe
Cc: Greg Stark; Stephan Szabo; Rick Schumeyer; pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
Scott Marlowe [EMAIL PROTECTED] writes:
Hehe. When I
;
pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
Greg Stark [EMAIL PROTECTED] writes:
I think most MySQL users don't stumble on it, they learn it as the way
to handle the common use case when you join a master table against a
detail table and then want
Anthony Molinaro [EMAIL PROTECTED] writes:
By changing the values in the select/group by you are changing
Group! How can you arbitrarily add or exclude a column?
You can't do it.
Go back and reread the previous posts again. You missed the whole point.
--
greg
, October 12, 2005 11:43 PM
To: Anthony Molinaro
Cc: Tom Lane; Greg Stark; Scott Marlowe; Stephan Szabo; Rick Schumeyer;
pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
Anthony Molinaro [EMAIL PROTECTED] writes:
By changing the values in the select/group by you
Anthony Molinaro [EMAIL PROTECTED] writes:
Greg,
You'll have to pardon me...
I saw this comment:
I don't see why you think people stumble on this by accident.
I think it's actually an extremely common need.
Which, if referring to the ability to have items in the select that do not
Marlowe; Stephan Szabo; Rick
Schumeyer; pgsql-sql@postgresql.org
Subject: Re: [SQL] pg, mysql comparison with group by clause
Anthony Molinaro [EMAIL PROTECTED] writes:
Greg,
You'll have to pardon me...
I saw this comment:
I don't see why you think people stumble on this by accident.
I
I'm not sure what I was thinking, but I tried the following query in pg:
SELECT * FROM t GROUP BY state;
pg returns an error.
Mysql, OTOH, returns the first row for each state. (The first row with
AK, the first row with PA, etc.)
I'm no SQL expert, but it seems to me that the pg behavior is
On Tue, 2005-10-11 at 16:12, Rick Schumeyer wrote:
I'm not sure what I was thinking, but I tried the following query in pg:
SELECT * FROM t GROUP BY state;
pg returns an error.
Mysql, OTOH, returns the first row for each state. (The first row with
AK, the first row with PA, etc.)
You're 100% correct, this is a bug in mysql.
Sadly, they tout this as a feature!
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rick Schumeyer
Sent: Tuesday, October 11, 2005 5:12 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] pg, mysql comparison
On Tue, 11 Oct 2005, Rick Schumeyer wrote:
I'm not sure what I was thinking, but I tried the following query in pg:
SELECT * FROM t GROUP BY state;
pg returns an error.
Mysql, OTOH, returns the first row for each state. (The first row with
AK, the first row with PA, etc.)
I'm no SQL
28 matches
Mail list logo