Re: Natural sort order extension.

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Dmitry Igrishin <dmitigr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Natural sort order extension.
Date: 2020-02-12 16:55:17
Message-ID: e45ddcafb206fa834a3348075685ccb7abfee82c.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-02-12 16:59:46 Re: How to restore roles without changing postgres password
Previous Message Adrian Klaver 2020-02-12 16:39:27 Re: How to restore roles without changing postgres password