Re: NUMERIC private methods?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: NUMERIC private methods?
Date: 2014-12-19 15:56:34
Message-ID: 27833.1419004594@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-12-19 16:06:04 Suppressing elog.c context messages (was Re: Wait free LW_SHARED acquisition)
Previous Message Craig Ringer 2014-12-19 15:46:59 Re: [PATCH] HINT: pg_hba.conf changed since last config reload