Re: NUMERIC private methods? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: NUMERIC private methods?
Date
Msg-id 27833.1419004594@sss.pgh.pa.us
Whole thread Raw
In response to Re: NUMERIC private methods?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: NUMERIC private methods?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I think what it boils down to is that several people here (and I'll
> add my voice to the chorus) are saying, hey, numeric is really useful,
> and we'd like to be able to manipulate numerics without all the palloc
> and fmgr overhead, and your response appears to be to say, use float8.
> That may be the right answer in some cases, but certainly not in all.

Well, there are two components to what I'm saying.  One is that the
example David started with looks like it could use some better-informed
consideration about which datatype to use.  The other is that numeric
leaves quite a lot to be desired still, and someday we might want to fix
that, and that might require breaking the APIs you want to expose.

> You make this argument every time somebody wants to drop static from a
> function or stick PGDLLIMPORT on a variable, and frankly I think it's
> pretty developer-hostile.  I would much rather see us go ahead and do
> those things and if people later complain that we broke stuff, we'll
> go tell them to pound sand.

Really.  I will remember that next time you bitch about us changing some
extension-visible behavior, which AFAIR you are usually one of the first
to complain about.

Anyway, if we do this, I concur with Alvaro's suggestion that the
additional exposure be in a header file named something like
numeric_private.h, so that there's less room for complaint when
we change it.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [PATCH] HINT: pg_hba.conf changed since last config reload
Next
From: Andres Freund
Date:
Subject: Suppressing elog.c context messages (was Re: Wait free LW_SHARED acquisition)