Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BE3BC633130 for ; Mon, 21 Dec 2009 18:53:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80650-10 for ; Mon, 21 Dec 2009 22:53:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by mail.postgresql.org (Postfix) with ESMTP id D3D55633038 for ; Mon, 21 Dec 2009 18:53:06 -0400 (AST) Received: by ewy5 with SMTP id 5so6676881ewy.34 for ; Mon, 21 Dec 2009 14:53:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=M9I5/wpoJfNmvLTui/cLpzKf1WtqUaWHcBLz03jUo9Y=; b=ini/M5DPegB0NmXlhRFjIM8/im1vnEcC5zIxlxwUHq3s7epgVuLIFdbOEMX6dFLJPW 6p76hd6oclJLAosp4D5VRgawdrelJlPPYtatEo3fgvulTVJnN6oQYe7Q7UhTqXk/gsAp etjZAo19QGOj/+/U7JiynGxq76mqvE8HrFPGw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=KJwJR3qwLgSe9BEMhTxNafnsKpj5YP1BdzUIHiw7TKZjNmld+tqPx+A+E4oYB7Nhea xhe1jXS/uJ9YDwGGsYgy53T3bIl+3B3ccowPXxf9PgFtg1gaJY1qXrUxPdQJy/R3UCCD aHwY4JuA0wL3t3VRBb1fjDaBRAV3AbM62aCac= MIME-Version: 1.0 Received: by 10.216.93.12 with SMTP id k12mr2855077wef.195.1261435984832; Mon, 21 Dec 2009 14:53:04 -0800 (PST) In-Reply-To: References: <302670f20912211415n4fc73b04x19eebfb9ff0acd60@mail.gmail.com> Date: Mon, 21 Dec 2009 15:53:04 -0700 Message-ID: Subject: Re: 8.4.1 distinct query WITHOUT order by From: Scott Marlowe To: Thomas Kellerer Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/50 X-Sequence-Number: 33488 On Mon, Dec 21, 2009 at 3:38 PM, Thomas Kellerer wrote: > Gary Chambers wrote on 21.12.2009 23:15: >> >> The current maintainer is unsure about being able to do the right >> thing and recompile the code after fixing the query. > > Why not simply add the necessary GROUP BY? Yeah, if you're code base is that fragile, bandaging it up by jumping through hoops in pgsql is just putting off the inevitable when it (the code base) has to get recompiled someday anyway.