Re: help with pagila

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Walter Cruz <walter(dot)php(at)gmail(dot)com>
Cc: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, pgsql-sql(at)postgresql(dot)org
Subject: Re: help with pagila
Date: 2006-09-01 19:58:58
Message-ID: 1157140737.4786.31.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 2006-09-01 at 12:26, Walter Cruz wrote:
> So I can assume that the MySQL implementation is strange? (It accepts
> that kind of query)

Yes, according to the SQL spec, you should generally get an error when
you run a query like this:

select field1, field2 from table group by field1

since you could theoretically get a different value for field2 each time
you run the query. If the data looked like this:

field1 | field2
-------+--------
1 | 1
1 | 3
2 | 5
2 | 3

The possible answers to that query would be (1,1)(2,5), (1,1)(2,3),
(1,3)(2,5), (1,3)(2,3)

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-09-01 20:21:48 Re: help with pagila
Previous Message Tomas Vondra 2006-09-01 18:06:01 Re: help with pagila