Re: Sort question - Fractions, Metric etc - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Sort question - Fractions, Metric etc
Date
Msg-id 21c49a99-b0e8-35ef-e31a-872c2960c414@aklaver.com
Whole thread Raw
In response to Re: Sort question - Fractions, Metric etc  (Bret Stern <bret_stern@machinemanagement.com>)
List 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.klaver@aklaver.com



pgsql-general by date:

Previous
From: Bret Stern
Date:
Subject: Re: Sort question - Fractions, Metric etc
Next
From: Gavan Schneider
Date:
Subject: Re: Sort question - Fractions, Metric etc