Re: type of some table storage params on doc

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Atsushi Torikoshi <atorik(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: type of some table storage params on doc
Date: 2020-03-18 17:12:36
Message-ID: 20200318171236.GA24140@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Mar-18, Tom Lane wrote:

> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > On 2020-Mar-18, Michael Paquier wrote:
> >> On Mon, Mar 16, 2020 at 11:07:37AM +0900, Atsushi Torikoshi wrote:
> >>>> In this case, the parsing uses parse_real(), which is exactly the same
> >>>> code path as what real GUCs use.
>
> > Hmm. So unadorned 'floating point' seems to refer to float8; you have
> > to use float(24) in order to get a float4. The other standards-mandated
> > name for float4 seems to be REAL. (I had a look around but was unable
> > to figure out whether the standard mandates exact bit widths other than
> > the precision spec). Since they're not doubles, what about we use REAL
> > rather than FLOATING POINT?
>
> Isn't this whole argument based on a false premise? What parse_real
> returns is double, not float. Also notice that config.sgml consistently
> documents those GUCs as <type>floating point</type>. (I recall having
> recently whacked some GUC descriptions that were randomly out of line
> with that.)

Ah, I hadn't checked -- I was taking the function and struct names at
face value, but it turns out that they're lies as well -- parse_real,
relopt_real all parsing/storing doubles *is* confusing.

That being the case, I agree that "float4" is the wrong thing and
"floating point" is what to use.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-03-18 17:13:59 Re: type of some table storage params on doc
Previous Message Tom Lane 2020-03-18 17:09:04 Re: proposal: new polymorphic types - commontype and commontypearray