From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Bret Stern <bret_stern@machinemanagement.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Sort question - Fractions, Metric etc
Date: Sat, 14 Aug 2021 13:03:02 -0400
Message-ID: <160750.1628960582@sss.pgh.pa.us> (raw)
In-Reply-To: <0310c35b-10b1-83a2-4efc-7e569a634001@aklaver.com>
References: <57f60e61-114f-c403-b2e2-820e76f08d64@machinemanagement.com>
<24d005b3-47a4-3f78-450e-d394b9e47d6f@aklaver.com>
<40fa1830-71d0-c908-ba5e-5c72cfbe9368@machinemanagement.com>
<0310c35b-10b1-83a2-4efc-7e569a634001@aklaver.com>
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 8/14/21 9:37 AM, Bret Stern wrote:
>> I haven't explored doing this with numeric types, but some columns
>> needed alpha chars eg 13mm.
> Two columns:
> data_val(numeric) data_unit(varchar)
> 13 mm
It sounds like your data is a completely disorganized mess :-(.
You might be able to bring some semblance of coherence to it with
an extension like postgresql-unit [1], but it will take a lot of
effort to get the data into a representation that can sort reasonably.
There's no "easy button" here.
regards, tom lane
[1] https://github.com/df7cb/postgresql-unit
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: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, bret_stern@machinemanagement.com
Subject: Re: Sort question - Fractions, Metric etc
In-Reply-To: <160750.1628960582@sss.pgh.pa.us>
References: <57f60e61-114f-c403-b2e2-820e76f08d64@machinemanagement.com> <24d005b3-47a4-3f78-450e-d394b9e47d6f@aklaver.com> <40fa1830-71d0-c908-ba5e-5c72cfbe9368@machinemanagement.com> <0310c35b-10b1-83a2-4efc-7e569a634001@aklaver.com> <160750.1628960582@sss.pgh.pa.us>
* 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