Re: Sort question - Fractions, Metric etc

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: 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 22:23:09
Message-ID: 21c49a99-b0e8-35ef-e31a-872c2960c414@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/14/21 2:47 PM, Bret Stern wrote:
>
> On 8/14/2021 2:13 PM, Adrian Klaver wrote:
>> On 8/14/21 2:04 PM, Bret Stern wrote:

> Vendors supply dimensions, depending on where in the world the product
> comes from, could be metric, imperial
>
> or fraction
>
>> Yes, nominal dimensions. That is what I'm trying to work out, is this
>> something that makes sense to the vendor and should not be tampered with?
>>
> The vendor is out of the picture at this point. They provide a catalog,
> and we enter (or import) items into our POS system. We match their
> dimension within tolerance.
>

It would seem then a entry system that specifies the initial input
unit(metric, imperial) and then does the conversion to a set unit(my
preference would be metric) for storage to the table in that unit. Then
you would convert on the fly to fill out the display field. Or you could
use something like generated
columns(https://www.postgresql.org/docs/12/ddl-generated-columns.html)
available in Postgres 12+ to pre-fill columns to save the overhead on
subsequent queries. For pre-12 maybe a trigger on the table column to
fill in the other columns. In any case you sort(order by) by your
canonical column which would be of numeric type.

> No. Slabs eg granite, slate, dolemite, marble..cut from larger blocks
> and delivered in blocks of ten slabs normally, where tolerances are
> also  +/- .032
>
> I will say this business has been behind in the attributes game. Plus
> there are many "artsy" vendors
>
> who can hardly speak in these terms, and don't publish to us, so we do
> the best we can.
>
> Getting vendors to supply the basic values is a struggle.
>
>>
>>>
>>> a 32nd or so.
>>>
>>> cheers
>>>
>>>
>>>
>>>
>>
>>
>>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gavan Schneider 2021-08-14 23:05:49 Re: Sort question - Fractions, Metric etc
Previous Message Bret Stern 2021-08-14 21:47:20 Re: Sort question - Fractions, Metric etc