Re: Sort bug

From: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
To: okijhhyu <okijhhyu(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Sort bug
Date: 2022-12-14 10:28:09
Message-ID: CALT9ZEHdWfV-cdp5nbWxvD_zvZEQEg_omqmJ-25YEBarVrBd2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> Good morning, dear friends.
>
> In sorting by DESC null in up and ASC ‘’ in up, why them not near?
>
> Respectfully yours, okijhhyu
NULLS are not empty values but undefined values. Nevertheless, in
PostgreSQL there is the following default order for their sorting: "By
default, null values sort as if larger than any non-null value; that
is, NULLS FIRST is the default for DESC order, and NULLS LAST
otherwise." (https://www.postgresql.org/docs/current/queries-order.html).

Nulls ordering can be changed by. The NULLS FIRST and NULLS LAST
options can be used to determine whether nulls appear before or after
non-null values in the sort ordering.

Do you see this or something contrary to?

Best regards,
Pavel Borisov,
Supabase

In response to

  • Sort bug at 2022-12-14 07:20:21 from okijhhyu

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2022-12-14 12:54:11 Re: BUG #17720: pg_dump creates a dump with primary key that cannot be restored, when specifying 'using index ...'
Previous Message Daniel Gustafsson 2022-12-14 10:22:58 Re: Sort bug