Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T4MBr-0001aK-SH for pgsql-bugs@postgresql.org; Thu, 23 Aug 2012 01:26:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T4MBp-0002oA-B8 for pgsql-bugs@postgresql.org; Thu, 23 Aug 2012 01:26:31 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q7N1QRFt027429; Wed, 22 Aug 2012 21:26:27 -0400 (EDT) From: Tom Lane To: Denis Kolesnik cc: pgsql-bugs@postgresql.org, Kevin Grittner Subject: Re: bug #7499 additional comments In-reply-to: References: Comments: In-reply-to Denis Kolesnik message dated "Wed, 22 Aug 2012 23:12:21 +0300" Date: Wed, 22 Aug 2012 21:26:27 -0400 Message-ID: <27428.1345685187@sss.pgh.pa.us> X-Pg-Spam-Score: -2.1 (--) X-Archive-Number: 201208/169 X-Sequence-Number: 33893 Denis Kolesnik writes: > You would sugguest, that one should read documentation. Indeed. > in the (where with ... replaced a directory in which the PostgreSQL installed) > ...PostgreSQL\9.1\doc\postgresql\html\queries-limit.html > "...When using LIMIT, it is important to use an ORDER BY clause that > constrains the result rows into a unique order. .." > here asked to use "ORDER BY" which is done in every query above. What you are stubbornly refusing to grasp is that your ORDER BY is not sufficient to ensure a unique order. The above-quoted sentence does not promise that any old ORDER BY will do. If you simply ORDER BY a non-unique column, the query's output ordering is only constrained up to the point that rows with the same ordering value will be adjacent. If you want more than that, you need to add additional columns to the ORDER BY to resolve cases where that column is equal. As long as you haven't done that, you are wrong, and you are wasting both your time and ours arguing about it. You've wasted quite enough of my time already; don't expect to see any further responses on this subject. regards, tom lane