[GENERAL] Defining functions for arrays of any number type

2014-12-10 Thread Paul Jungwirth
Hello, I'm working on a package of functions that compute statistics on arrays of numbers. For example this one computes a histogram from a bunch of values plus some bucket characteristics: CREATE OR REPLACE FUNCTION array_to_hist(double precision[], double precision, double precision, int)

Re: [GENERAL] Defining functions for arrays of any number type

2014-12-10 Thread Tom Lane
Paul Jungwirth p...@illuminatedcomputing.com writes: Is it legal to define a bunch of functions all called `array_to_hist` for the different numeric types, and have them all implemented by the same C function? Sure. (There is a regression test that objects if we try to do that with built-in