>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:
>> Hmm. You'd want to make add_var, mul_var etc. non-static? Tom> -1 for that. possibly with more meaningful names. Tom> If you're concerned about arithmetic performance, there is a Tom> very obvious fix here: use double. Independently of this specific example, the obvious issue there is that there are applications for which double is simply not acceptable. As it stands, no extension can use the numeric type in any non-trivial way without paying a large penalty for repeated pallocs and data copies. Given that the ability to write C extensions easily is one of pg's great strengths, this is a defect that should be corrected. Tom> (It would still be orders of magnitude slower, no matter how Tom> much we were willing to destroy numeric.c's modularity Tom> boundary.) There is no need to expose any details of NumericVar's implementation; it would suffice to provide an interface to allocate NumericVars, and access to the functions. -- Andrew (irc:RhodiumToad) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers