Re: Inconsistent information on default ordering for ORDER BY clause - Mailing list pgsql-docs

From David Rowley
Subject Re: Inconsistent information on default ordering for ORDER BY clause
Date
Msg-id CAApHDvoV-gaKcZmOwChZOVoLfqfEHh5KBpuwh7Sx8u9iSDS8YA@mail.gmail.com
Whole thread Raw
In response to Inconsistent information on default ordering for ORDER BY clause  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: Inconsistent information on default ordering for ORDER BY clause
List pgsql-docs
On Fri, 8 Dec 2023 at 22:49, PG Doc comments form
<noreply@postgresql.org> wrote:
> Page: https://www.postgresql.org/docs/16/sql-select.html
> Description:
>
> At the top of the sql-select page it says
>
> "If ORDER BY is not given, the rows are returned in whatever order the
> system finds fastest to produce."
>
> but later it says
>
> "Optionally one can add the key word ASC (ascending) or DESC (descending)
> after any expression in the ORDER BY clause. If not specified, ASC is
> assumed by default."
>
> The first statement implies that you cannot rely on the default ordering,
> but the second implies that you can (and it will be ASC).

Perhaps you're going wrong in the last sentence in the latter fragment
where it says "If not specified".  This is talking about ASC/DESC
rather than the ORDER BY.

Maybe that could be made more clear. Something like "If ASC or DESC is
not specified, ASC is assumed by default".

Would that make it more clear?

David



pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Inconsistent information on default ordering for ORDER BY clause
Next
From: Zane Duffield
Date:
Subject: Re: Inconsistent information on default ordering for ORDER BY clause