Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Re: Resolving p...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 9 Topic 9618 of 10389
Post > Topic >>

Re: Resolving polymorphic functions with relateddatatypes

by tgl@[EMAIL PROTECTED] (Tom Lane) Jul 3, 2008 at 12:01 PM

Gregory Stark <stark@[EMAIL PROTECTED]
> writes:
> I think what you're suggesting is making integer and floating point
constants
> like 0 and 0.1 be treated as "unknown" or perhaps a different kind of
unknown,
> "unknown integral type" and "unknown numeric type".

No, that would be a pretty dangerous way to go about it, because it
would have side-effects on all sorts of queries whether or not they
made any use of polymorphic functions.  Plus, it would only fix the
issue for numeric-group types, but the same thing would come up if
you had, say, NVL(text, varchar).

What I'd be inclined to think about is making
check_generic_type_consistency and related functions allow the
arguments matched to ANYELEMENT to be of different actual types
so long as select_common_type could determine a unique type to
coerce them all to.  It'd take some refactoring (notably, because
select_common_type wants to throw error on failure, and because
there'd have to be a way to pass back the type that was selected
for use later).

			regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 9 Posts in Topic:
Resolving polymorphic functions with related datatypes
simon@[EMAIL PROTECTED]   2008-07-03 10:36:09 
Re: Resolving polymorphic functions with related datatypes
pavel.stehule@[EMAIL PROT  2008-07-03 12:22:21 
Re: Resolving polymorphic functions with related
simon@[EMAIL PROTECTED]   2008-07-03 11:51:38 
Re: Resolving polymorphic functions with related datatypes
heikki@[EMAIL PROTECTED]   2008-07-03 14:11:34 
Re: Resolving polymorphic functions with related
simon@[EMAIL PROTECTED]   2008-07-03 13:34:05 
Re: Resolving polymorphic functions with relateddatatypes
stark@[EMAIL PROTECTED]   2008-07-03 13:54:29 
Re: Resolving polymorphic functions with relateddatatypes
tgl@[EMAIL PROTECTED] (T  2008-07-03 12:01:25 
Re: Resolving polymorphic functions with relateddatatypes
simon@[EMAIL PROTECTED]   2008-07-03 14:24:06 
Re: Resolving polymorphic functions with relateddatatypes
pavel.stehule@[EMAIL PROT  2008-07-03 19:42:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 20:26:08 CDT 2008.