Re: Sort question - Fractions, Metric etc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Bret Stern <bret_stern(at)machinemanagement(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Sort question - Fractions, Metric etc
Date: 2021-08-14 17:03:02
Message-ID: 160750.1628960582@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sándor Daku 2021-08-14 17:19:08 Re: Sort question - Fractions, Metric etc
Previous Message Bret Stern 2021-08-14 16:57:34 Re: Sort question - Fractions, Metric etc