public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <[email protected]>
To: David G. Johnston <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: ORDER BY elements in ARRAY
Date: Tue, 27 Aug 2024 18:27:26 +0200 (CEST)
Message-ID: <VisenaEmail.23.cb59002578ada57.19194a9213f@origo-test01.app.internal.visena.net> (raw)
In-Reply-To: <CAKFQuwZRaJ4AHNQZgs6pNru_WGm5MOjH+mHa3dWELNS=N_4j6w@mail.gmail.com>
References: <VisenaEmail.11.efc8bf0cbc6c75fa.1919390a6d7@origo-test01.app.internal.visena.net>
	<CAKFQuwZtFH9ZdrTvRMrE=Xq-HU0-xsmbfzmcyeSG7O5svtHW0Q@mail.gmail.com>
	<VisenaEmail.22.4c3384825217cb30.1919450fe29@origo-test01.app.internal.visena.net>
	<CAKFQuwZRaJ4AHNQZgs6pNru_WGm5MOjH+mHa3dWELNS=N_4j6w@mail.gmail.com>



På tirsdag 27. august 2024 kl. 18:03:37, skrev David G. Johnston <
[email protected] <mailto:[email protected]>>:
On Tuesday, August 27, 2024, Andreas Joseph Krogh <[email protected] 
<mailto:[email protected]>> wrote:
[…]



This doesn't really do it. I'm looking for something analogous to Java's 
Comparator-interface so the custom datatype knows how to sort itself.


Ah. Then either just put those two values into the first two field positions 
of your custom type and live with an easy, but also self-contained, hack, or 
figure out what incantations of create operator and/or create operator family 
are need to install custom behavior for the b-tree < and > operators. I’m 80% 
sure it’s doable, 60% in plpgsql…

David J.


Ah, seems CREATE OPERATOR is worth pursuing.

Thanks.






--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
[email protected] <mailto:[email protected]>
www.visena.com <https://www.visena.com;
 <https://www.visena.com;


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: ORDER BY elements in ARRAY
  In-Reply-To: <VisenaEmail.23.cb59002578ada57.19194a9213f@origo-test01.app.internal.visena.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox