From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: float4in_internal
Date: Wed, 21 Dec 2022 17:01:30 -0500
Message-ID: <b862e588-3d47-e591-a436-938594559488@dunslane.net> (raw)
In-Reply-To: <1352557.1671636815@sss.pgh.pa.us>
References: <cee4e426-d014-c0b7-aa22-a659f2cd9130@dunslane.net>
<1352557.1671636815@sss.pgh.pa.us>
On 2022-12-21 We 10:33, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> The attached patch factors out the guts of float4in so that the new
>> float4in_internal function is callable without going through the fmgr
>> call sequence. This will make adjusting the seg module's input function
>> to handle soft errors simpler. A similar operation was done for float8in
>> some years ago in commit 50861cd683e. The new function has an identical
>> argument structure to float8in_internal.
> Looks reasonable except for one nitpick: the "out of range" message
> in the ERANGE case should be kept mentioning real, not the passed
> type_name, to be equivalent to the way float8in_internal does it.
> I lack enough caffeine to recall exactly why float8in_internal
> does it that way, but the comments are exceedingly clear that it was
> intentional, and I'm sure the same rationale would apply here.
>
> (float8in_internal also goes out of its way to show just the part of
> the string that is the number in that case, but I'm willing to let
> that pass for now.)
>
>
Thanks for reviewing.
I made both these changes, to keep the two functions more closely aligned.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.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-hackers@postgresql.org
Cc: andrew@dunslane.net, tgl@sss.pgh.pa.us
Subject: Re: float4in_internal
In-Reply-To: <b862e588-3d47-e591-a436-938594559488@dunslane.net>
References: <cee4e426-d014-c0b7-aa22-a659f2cd9130@dunslane.net> <1352557.1671636815@sss.pgh.pa.us> <b862e588-3d47-e591-a436-938594559488@dunslane.net>
* 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