Re: Re: [SQL] 7.0 weirdness - Mailing list pgsql-hackers

From Matthias Urlichs
Subject Re: Re: [SQL] 7.0 weirdness
Date
Msg-id 20000530163135.P25517@noris.de
Whole thread Raw
In response to Re: [SQL] 7.0 weirdness  (Jeff MacDonald <jeff@pgsql.com>)
Responses Re: Re: [SQL] 7.0 weirdness  (Jeff MacDonald <jeff@pgsql.com>)
List pgsql-hackers
Hi,

Jeff MacDonald:
> gid is unique.. it's a serial..
> 
Then there is no point in using "DISTINCT" in the first place, is there?

> funny thing is tho this worked on 6.5

It happened to work because your gid is unique. But in the general case,
it can't work. Consider this table:

gid  createdX      1Y      2X      3

Now, should your query's result be

gidXY

or should it be

gidYX

? And since the typical implementation throws away non-selected-for
columns before UNIQUEing, how should it be able to sort anything?

-- 
Matthias Urlichs  |  noris network GmbH   |   smurf@noris.de  |  ICQ: 20193661
The quote was selected randomly. Really.       |        http://smurf.noris.de/
-- 
Problem mit cookie: File exists 


pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: AW: AW: Proposal for enhancements of privilege system
Next
From: Tom Lane
Date:
Subject: Re: [SQL] 7.0 weirdness