Re: Defining functions for arrays of any number type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Defining functions for arrays of any number type
Date: 2014-12-11 05:18:30
Message-ID: 16518.1418275110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Paul Jungwirth <pj(at)illuminatedcomputing(dot)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 functions, but it's meant to catch accidental errors rather
than intentional overloading. As long as the C code is prepared to
handle all the cases, you can do what you like.)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jacob Bunk Nielsen 2014-12-11 08:31:12 Re: Next steps in debugging database storage problems?
Previous Message Melvin Davidson 2014-12-11 04:32:19 Re: Stored procedure workflow question