Re: bug #7499 additional comments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Denis Kolesnik <lirex(dot)software(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: bug #7499 additional comments
Date: 2012-08-23 01:26:27
Message-ID: 27428.1345685187@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Denis Kolesnik <lirex(dot)software(at)gmail(dot)com> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Ringer 2012-08-23 01:57:57 Re: additional message to the bug #7499
Previous Message Tom Lane 2012-08-22 22:13:18 Re: GROUP BY checks inadequate when set returning functions in column list