Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mExO3-0006Am-1T for pgsql-general@arkaria.postgresql.org; Sat, 14 Aug 2021 17:23:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mExO2-0000Uv-11 for pgsql-general@arkaria.postgresql.org; Sat, 14 Aug 2021 17:23:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mExO0-0000Un-IS for pgsql-general@lists.postgresql.org; Sat, 14 Aug 2021 17:23:57 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mExNu-0006hs-Ur for pgsql-general@lists.postgresql.org; Sat, 14 Aug 2021 17:23:55 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 85417320091B; Sat, 14 Aug 2021 13:23:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 14 Aug 2021 13:23:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=2 LHr1G/XCmNKE4iybZXjer7YZPrk/5jedZg9dg9xd0k=; b=QDvf1yGED9x0GSqPI PlUpEx/0rwX2gQIL+L79P4od314gA13XlfKfpghhpqFFT+vuzckcFHY0RKau4gok uIL0y7MXhOLXx/lk0HMGxFQ3YvK+yliyhprirz5Nmr52xPmbU7jPKEF09dB422GF BkNz1Ycr3RJtO9As/grC1QsiQ++pHUidDsQ6xb9U2NGHGYwEA1QD67bICxIXa7HM FcOYDhiDTtSQlS1uyvjp+SvcwWnXCitVl/4nsWa9a97UQHTSEzFYuUaGosslZZB7 f5kMTFH8fcYygq4v4uNGHuC0btiCZiLHA/HOyB8UwPJBkdaS3NH21rfBDJSbYCtX uksJg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=2LHr1G/XCmNKE4iybZXjer7YZPrk/5jedZg9dg9xd 0k=; b=dAjnC9OJcfNc4rxNQHCn0fT5DryZRgFsBkZ7qrnIXNnkVqzGNMGp6Vxz2 n7zJ25glAf93ndoMi1827mfcbqIq20AHCGHwzjoRWof/r5aPYm49z0e14nG7cQ2q JfBUzWlGV2urkcDDv/NYaWmYtJr/QbvvAsjtlhkDRzZpfYd/NsKwz3FeUfeaocKX KkrxoLRNcOR3L8lf/hnTwrYHo03MU9wIILDsKYS6Xh3a1nJoKMVGB5X3VvqpU13P 2EQn2ByFQltjfz0CjZQ4dpwdBiyuymZd5wPjnrjS3MEgykXAmtuRbxb3zybyvZou DrCtp1zhldgRS87tRM03WqJO1Uegw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrkeejgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeegteevfeeugfeltdfgtdduieehhfefvdfgiedvudfh ieeuteejueeghfeuhefgveenucffohhmrghinhepfihikhhiphgvughirgdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgr nhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 14 Aug 2021 13:23:47 -0400 (EDT) Subject: Re: Sort question - Fractions, Metric etc To: =?UTF-8?Q?S=c3=a1ndor_Daku?= , Tom Lane Cc: Bret Stern , pgsql-general@lists.postgresql.org 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> From: Adrian Klaver Message-ID: Date: Sat, 14 Aug 2021 10:23:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/14/21 10:19 AM, Sándor Daku wrote: > > I'm not sure, but maybe a kind of cast function that cast everything > into a reasonable common unit(Khm... millimeters) and sort on that? It > seems relatively simple to pick up the value and unit from a string with > a regexp. Admittedly the data would still be a mess. I see the potential for another crash landing:) : https://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_failure > > Regards, > Sándor -- Adrian Klaver adrian.klaver@aklaver.com