pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Dmitry Igrishin <dmitigr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Natural sort order extension.
Date: Wed, 12 Feb 2020 17:55:17 +0100
Message-ID: <e45ddcafb206fa834a3348075685ccb7abfee82c.camel@cybertec.at> (raw)
In-Reply-To: <CAAfz9KPYp0MQ_30w1vKHBTWfQ=JZLxAH-ty4oZ2sgYe09c+d5g@mail.gmail.com>
References: <CAAfz9KPYp0MQ_30w1vKHBTWfQ=JZLxAH-ty4oZ2sgYe09c+d5g@mail.gmail.com>

On Wed, 2020-02-12 at 18:45 +0300, Dmitry Igrishin wrote:
> I've implemented a PostgreSQL extension for natural sort order. I.e.
> strings like "z20", "z0004", "z11", "z2" sorted in ascending order as
> "z2", "z0004", "z11", "z20".
> 
> Currently it implements the type textnso which is binary-coercible
> to/from the text type. It's possible to declare table columns of type
> textnso and create indexes on them.
> 
> Details are here https://github.com/dmitigr/pgnso
> 
> Any feedback are welcome!

I don't want to detract from this, but from PostgreSQL v10 on you can use
ICU collations with the "kn-true" variant to have natural sort order.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (3+ messages)  latest in thread

Message-ID: <e45ddcafb206fa834a3348075685ccb7abfee82c.camel@cybertec.at>
Permalink:  ../e45ddcafb206fa834a3348075685ccb7abfee82c.camel@cybertec.at/
Also on:    postgresql.org/message-id/e45ddcafb206fa834a3348075685ccb7abfee82c.camel@cybertec.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, dmitigr@gmail.com
  Subject: Re: Natural sort order extension.
  In-Reply-To: <e45ddcafb206fa834a3348075685ccb7abfee82c.camel@cybertec.at>
  References: <CAAfz9KPYp0MQ_30w1vKHBTWfQ=JZLxAH-ty4oZ2sgYe09c+d5g@mail.gmail.com> <e45ddcafb206fa834a3348075685ccb7abfee82c.camel@cybertec.at>

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

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