X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 26066D1B441 for ; Thu, 22 Apr 2004 10:01:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 43450-03 for ; Thu, 22 Apr 2004 10:01:20 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 77E7ED1BB36 for ; Thu, 22 Apr 2004 10:01:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3MD1KDg025338; Thu, 22 Apr 2004 09:01:20 -0400 (EDT) To: ogjunk-pgjedan@yahoo.com Cc: pgsql-sql@postgresql.org Subject: Re: Order by YYYY MM DD in reverse chrono order trouble In-reply-to: <20040422095648.88816.qmail@web12706.mail.yahoo.com> References: <20040422095648.88816.qmail@web12706.mail.yahoo.com> Comments: In-reply-to message dated "Thu, 22 Apr 2004 02:56:48 -0700" Date: Thu, 22 Apr 2004 09:01:20 -0400 Message-ID: <25337.1082638880@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/228 X-Sequence-Number: 17603 writes: > I'd love to be able to do that, but I cannot just ORDER BY uu.add_date, > because I do not have uu.add_date in the SELECT part of the statement. Sure you can. Back around SQL89 there was a restriction that ORDER BY values had to appear in the SELECT list as well, but no modern database has such a restriction anymore ... regards, tom lane