Received: from curie.pictime.fr (smtp.pictime.fr [195.6.184.20]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA49601 for ; Tue, 30 May 2000 09:31:50 -0400 (EDT) (envelope-from pfiche@prologue-software.fr) Received: from [194.149.177.219] by curie.les-idees.net (NTMail 5.05.0002/NY8271.00.3898e3b3) with ESMTP id qmjxdaaa for pgsql-sql@postgresql.org; Tue, 30 May 2000 15:32:57 +0200 Received: from [132.147.160.80] by popeye.prologue-software.fr (NTMail 3.02.13) with ESMTP id pa128767 for ; Tue, 30 May 2000 15:15:41 +0200 Received: FROM patrick BY popeye ; Tue May 30 15:15:40 2000 +0200 From: "Patrick FICHE" To: "Jeff MacDonald" Cc: "Pgsql-Sql" Subject: RE: 7.0 weirdness Date: Tue, 30 May 2000 15:17:38 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Importance: Normal In-Reply-To: X-Archive-Number: 200005/193 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