X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B1E4B5E46DF for ; Wed, 18 Aug 2004 12:13:32 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15418-01 for ; Wed, 18 Aug 2004 15:13:37 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 11B965E46EA for ; Wed, 18 Aug 2004 12:13:29 -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 i7IFDaXS022766; Wed, 18 Aug 2004 11:13:36 -0400 (EDT) To: "Greg Sabino Mullane" Cc: pgsql-sql@postgresql.org Subject: Re: SQL Challenge: Arbitrary Cross-tab In-reply-to: <4229381dfaf8f3ae1e4cb0ae62d6f012@biglumber.com> References: <4229381dfaf8f3ae1e4cb0ae62d6f012@biglumber.com> Comments: In-reply-to "Greg Sabino Mullane" message dated "Wed, 18 Aug 2004 11:47:41 -0000" Date: Wed, 18 Aug 2004 11:13:35 -0400 Message-ID: <22765.1092842015@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/195 X-Sequence-Number: 18692 "Greg Sabino Mullane" writes: >> Don't you miss for each subselect an order by tid ? > No: since all the SELECTs are part of one statement, they > will have the same (pseudo-random) implicit order. Nope; Gaetano's right, you cannot assume that. It's entirely possible for the planner to choose different plans depending on the OFFSET. (Maybe not very likely, with such small offsets, but could happen.) regards, tom lane