pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthias Urlichs <smurf@noris.de>
To: Jeff MacDonald <jeff@pgsql.com>
Cc: omid omoomi <oomoomi@hotmail.com>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Re: 7.0 weirdness
Date: Tue, 30 May 2000 16:31:35 +0200
Message-ID: <20000530163135.P25517@noris.de> (raw)
In-Reply-To: <Pine.BSF.4.21.0005301109520.2897-100000@rage.hub.org>
References: <20000530134645.34684.qmail@hotmail.com>
	<Pine.BSF.4.21.0005301109520.2897-100000@rage.hub.org>

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  created
 X      1
 Y      2
 X      3

Now, should your query's result be

gid
 X
 Y

or should it be

gid
 Y
 X

? 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 



view thread (10+ messages)  latest in thread

Message-ID: <20000530163135.P25517@noris.de>
Permalink:  ../20000530163135.P25517@noris.de/
Also on:    postgresql.org/message-id/20000530163135.P25517@noris.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: smurf@noris.de, jeff@pgsql.com, oomoomi@hotmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] Re: 7.0 weirdness
  In-Reply-To: <20000530163135.P25517@noris.de>
  References: <20000530134645.34684.qmail@hotmail.com> <Pine.BSF.4.21.0005301109520.2897-100000@rage.hub.org> <20000530163135.P25517@noris.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox