Re: Set of header files for Ryu floating-point stuff in src/common/ - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Set of header files for Ryu floating-point stuff in src/common/
Date
Msg-id 8736h5eepr.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Set of header files for Ryu floating-point stuff in src/common/  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
>>>>> "Michael" == Michael Paquier <michael@paquier.xyz> writes:

 Michael> Hi all,
 Michael> (Andrew G. in CC)

 Michael> We have the following set of header files in src/common/:
 Michael> digit_table.h
 Michael> d2s_full_table.h
 Michael> d2s_intrinsics.h
 Michael> ryu_common.h

 Michael> Shouldn't all these files be in src/include/common/ instead?

No.

a) They are implementation, not interface.

b) Most of them are just data tables.

c) The ones that define inline functions have some specializations (e.g.
limits on ranges or shift counts) that make it unwise to expose more
generally.

They are kept as separate files primarily because upstream had them that
way (and having the data tables out of the way makes the code more
readable). But it's explicitly not a good idea for them to be installed
anywhere or to have any additional code depending on them, since it is
conceivable that they might have to change without warning or disappear
in the event that we choose to track some upstream change (or replace
Ryu entirely).

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Paul Guo
Date:
Subject: Re: Two pg_rewind patches (auto generate recovery conf and ensureclean shutdown)
Next
From: Alvaro Herrera from 2ndQuadrant
Date:
Subject: Re: Hypothetical indexes using BRIN broken since pg10