pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: omid omoomi <oomoomi@hotmail.com>
To: jeff@pgsql.com
To: pfiche@prologue-software.fr
Cc: pgsql-sql@postgresql.org
Subject: RE: 7.0 weirdness
Date: Tue, 30 May 2000 07:13:00 PDT
Message-ID: <20000530141300.6041.qmail@hotmail.com> (raw)

If so then why do you need to use "select distinct " ?!
BTW, I just tested on my 6.5.2, This query :
"Select distinct f1 from table1 order by f2 "
works the same as this one:
"select distinct f1,f2 from table1"


>From: Jeff MacDonald <jeff@pgsql.com>
>Reply-To: Jeff MacDonald <jeff@pgsql.com>
>To: Patrick FICHE <pfiche@prologue-software.fr>
>CC: Jeff MacDonald <jeff@pgsql.com>, Pgsql-Sql <pgsql-sql@postgresql.org>
>Subject: RE: [SQL] 7.0 weirdness
>Date: Tue, 30 May 2000 10:46:30 -0300 (ADT)
>
>gid is unique..
>
>jeff
>
>On Tue, 30 May 2000, Patrick FICHE wrote:
>
> > It seems to me that it was lack of control in 6.5 version...
> > For one "gid", you may have several "created" values, so Postgres is not
> > able to decide which value must be taken and ordered
> >
> > Simple example
> > gid         created
> > 1            1
> > 1            3
> > 2            2
> >
> > In which order is Postgres supposed to give the data???
> >
> >
> > Patrick Fiche
> > -----Message d'origine-----
> > De : pgsql-sql-owner@hub.org [mailto:pgsql-sql-owner@hub.org]De la part
> > de Jeff MacDonald
> > Envoyé : mardi 30 mai 2000 14:28
> > À : pgsql-sql@postgresql.org; pgsql-hackers@postgresql.org
> > Objet : [SQL] 7.0 weirdness
> >
> >
> > hi folks,
> >
> > this query works fine in 6.5 but screwie in 7.0
> >
> > 7.0
> >
> > gm=> SELECT DISTINCT gid FROM members
> > gm-> WHERE active = 't'
> > gm-> AND  (gender = 0
> > gm->         AND  (wantrstypemale LIKE '%Short Term%'
> > gm->                 OR wantrstypemale like '%Marriage%'
> > gm->                 OR wantrstypemale like '%Long Term%'
> > gm->                 OR wantrstypemale like '%Penpal%'
> > gm->                 OR wantrstypemale like '%Activity Partner%')
> > gm-> )  order by created desc;
> > ERROR:  For SELECT DISTINCT, ORDER BY expressions must appear in target 
>list
> > gm=>
> >
> >
> > any idea's ?
> >
> > jeff
> >
> >
> >
> >
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com




view thread (10+ messages)  latest in thread

Message-ID: <20000530141300.6041.qmail@hotmail.com>
Permalink:  ../20000530141300.6041.qmail@hotmail.com/
Also on:    postgresql.org/message-id/20000530141300.6041.qmail@hotmail.com

 · 

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: oomoomi@hotmail.com, jeff@pgsql.com, pfiche@prologue-software.fr
  Subject: Re: 7.0 weirdness
  In-Reply-To: <20000530141300.6041.qmail@hotmail.com>
  References: <20000530141300.6041.qmail@hotmail.com>

* 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