Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6GEeaa47255 for ; Mon, 16 Jul 2001 10:40:36 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.10.1/8.10.1) id f6GEe8L06240; Mon, 16 Jul 2001 10:40:08 -0400 (EDT) From: Bruce Momjian Message-Id: <200107161440.f6GEe8L06240@candle.pha.pa.us> Subject: Re: Hey! ORDER BY in VIEWS? In-Reply-To: <3B528BCF.92DEC4BB@archonet.com> "from Richard Huxton at Jul 16, 2001 07:38:08 am" To: Richard Huxton Date: Mon, 16 Jul 2001 10:40:08 -0400 (EDT) CC: Josh Berkus , Peter Eisentraut , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200107/201 X-Sequence-Number: 3996 > But - this gives them in reverse timestamp order. So - wrap the query in > a view and then apply your own ORDER BY. > > Can't remember who came up with this (some evil genius :-) - but it > seemed to make sense so I stuck the example in my PostgreSQL notes. We kept rejecting the idea of ORDER BY in a view until someone suggested LIMIT and ORDER BY, at which point we had to enable it. I think Tom did the work. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026