pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: float4in_internal
Date: Wed, 21 Dec 2022 10:33:35 -0500
Message-ID: <1352557.1671636815@sss.pgh.pa.us> (raw)
In-Reply-To: <cee4e426-d014-c0b7-aa22-a659f2cd9130@dunslane.net>
References: <cee4e426-d014-c0b7-aa22-a659f2cd9130@dunslane.net>

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.)

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <1352557.1671636815@sss.pgh.pa.us>
Permalink:  ../1352557.1671636815@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1352557.1671636815@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, andrew@dunslane.net
  Subject: Re: float4in_internal
  In-Reply-To: <1352557.1671636815@sss.pgh.pa.us>
  References: <cee4e426-d014-c0b7-aa22-a659f2cd9130@dunslane.net> <1352557.1671636815@sss.pgh.pa.us>

* 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