Adriaan Joubert <a(dot)joubert(at)albourne(dot)com> writes:
> Question is: should I add these functions? Are we looking at too much
> bloat, i.e. should I replace the (uint2,uint4) combinations with
> (int4,uint2) and (int4,uint4)? Lots of combinations are possible, but I
> do not have a good feel for the trade-offs.
My guess is that we ought to avoid bloating the system with
cross-datatype functions. I know there are some already for int2*int4
and so forth, but I'd like to see those go away in favor of a smarter
type promotion scheme --- ie, the parser should be able to figure out
that it ought to do int2_var * uint4_var as
A cross-datatype function ought to exist only if it can usefully do
something different from an implicit promotion.
Aside from bloating the system, providing a plethora of functions also
tends to confuse the ambiguous-function-call resolution mechanism.
See discussion of a few days ago wherein the parser could resolve an
ambiguous situation involving varchar, but could not resolve the same
situation with text, because there are too many possibilities for
coercion of text to something else.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Alfred Perlstein||Date: 2001-03-29 19:57:30|
|Subject: Re: [ADMIN] Re: Re: [PORTS] pgmonitor and Solaris|
|Previous:||From: Adriaan Joubert||Date: 2001-03-29 19:16:09|
|Subject: Unsigned int functions|