Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 15651632CBF for ; Tue, 22 Dec 2009 01:18:25 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 76757-04 for ; Tue, 22 Dec 2009 05:18:13 +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 1C8CA63289B for ; Tue, 22 Dec 2009 01:18:13 -0400 (AST) Received: by ewy5 with SMTP id 5so6930043ewy.34 for ; Mon, 21 Dec 2009 21:18:12 -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 :content-transfer-encoding; bh=Ir+J/oczOAgphWk7Je+ciEfG1uUkK+sGbJiUYEO3V1E=; b=FPSm5vkPgXtLMxsuGKkG29vSMFjdQrWcuezSrHsH9TUaBCRTcIPxZFDfscVJ1xC6h5 3ZS2WSSxRM0V/v1HzJmwI4Q6gxO76R5URC48oYfSItUDb/MI4JM60LHztUsuI4LHcBkr kht3NXhz1d6Oan/PvgQtZEJ/TfaUFcwmJ0fUU= 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:content-transfer-encoding; b=PdIImoQtrGDJKHTGOKwaMshaUDwF/g+RJHMcQHJB1m2SnrZ17iAukV/7hv1EyNi4Ox V5JteiLJ/DVweKB7SyveWz82ofG8FQGfmIcWXPgLpzvdIUzzBvYjvQzlJxEH5kcnbKYp fiyKqLYBpt7YodgDH69aOlFpmwAXU3JolnwyE= MIME-Version: 1.0 Received: by 10.216.90.77 with SMTP id d55mr2949315wef.146.1261459092434; Mon, 21 Dec 2009 21:18:12 -0800 (PST) In-Reply-To: <302670f20912211945n1b6684e9xb304d4508766f117@mail.gmail.com> References: <302670f20912211415n4fc73b04x19eebfb9ff0acd60@mail.gmail.com> <302670f20912211945n1b6684e9xb304d4508766f117@mail.gmail.com> Date: Mon, 21 Dec 2009 22:18:11 -0700 Message-ID: Subject: Re: 8.4.1 distinct query WITHOUT order by From: Scott Marlowe To: Gary Chambers Cc: Thomas Kellerer , pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.529 tagged_above=-10 required=5 tests=AWL=0.070, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/52 X-Sequence-Number: 33490 On Mon, Dec 21, 2009 at 8:45 PM, Gary Chambers wrote: >> 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. > > I appreciate (and agree with) the concern about the fragility of the > codebase. =A0The maintainer knows that anything except adding ORDER BY > is a kludge. > > Now, the aforementioned notwithstanding... Replacing the table with a view should work. Just be sure to make insert rules if you need it to be insertable by other parts of the app I guess.