Re: Considering additional sort specialisation functions for PG16

From: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Considering additional sort specialisation functions for PG16
Date: 2023-01-26 11:13:24
Message-ID: CALT9ZEE9VG8=keDsy_C2G9oTBY254oTZ_jUq4H02Lsgszh_PdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, John!
Generally, I like the separation of non-null values before sorting and
would like to join as a reviewer when we come to patch. I have only a
small question:

> - Only if there is more than one sort key, qsort the null array. Ideally at some point we would have a method of ignoring the first sortkey (this is an existing opportunity that applies elsewhere as well).
Should we need to sort by the second sort key provided the first one
in NULL by standard or by some part of the code relying on this? I
suppose NULL values in the first sort key mean attribute values are
undefined and there is no preferred order between these tuples, even
if their second sort keys are different.

And maybe (unlikely IMO) we need some analog of NULLS DISCTICNT/NOT
DISTINCT in this scope?

Kind regards,
Pavel Borisov,
Supabase.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-01-26 11:17:46 Re: drop postmaster symlink
Previous Message Tomas Vondra 2023-01-26 11:08:16 Re: Syncrep and improving latency due to WAL throttling