From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Bret Stern <bret_stern@machinemanagement.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Sort question - Fractions, Metric etc
Date: Sat, 14 Aug 2021 15:23:09 -0700
Message-ID: <21c49a99-b0e8-35ef-e31a-872c2960c414@aklaver.com> (raw)
In-Reply-To: <6ddf1160-68d2-7aea-8627-2b122a5fd339@machinemanagement.com>
References: <57f60e61-114f-c403-b2e2-820e76f08d64@machinemanagement.com>
<702e71c6-5091-9c65-87c0-e4599dddd376@gmail.com>
<643df9bf-7378-93fb-1c8c-fe31f08ec214@machinemanagement.com>
<f4b00240-67e0-806c-7473-6983220d38e2@aklaver.com>
<434282c4-dc47-d5f2-9ade-c493bdb09074@machinemanagement.com>
<2987852b-bab3-db5a-bf3f-d78081b14d1b@aklaver.com>
<6ddf1160-68d2-7aea-8627-2b122a5fd339@machinemanagement.com>
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
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: adrian.klaver@aklaver.com, bret_stern@machinemanagement.com
Subject: Re: Sort question - Fractions, Metric etc
In-Reply-To: <21c49a99-b0e8-35ef-e31a-872c2960c414@aklaver.com>
References: <57f60e61-114f-c403-b2e2-820e76f08d64@machinemanagement.com> <702e71c6-5091-9c65-87c0-e4599dddd376@gmail.com> <643df9bf-7378-93fb-1c8c-fe31f08ec214@machinemanagement.com> <f4b00240-67e0-806c-7473-6983220d38e2@aklaver.com> <434282c4-dc47-d5f2-9ade-c493bdb09074@machinemanagement.com> <2987852b-bab3-db5a-bf3f-d78081b14d1b@aklaver.com> <6ddf1160-68d2-7aea-8627-2b122a5fd339@machinemanagement.com> <21c49a99-b0e8-35ef-e31a-872c2960c414@aklaver.com>
* 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