Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5I23Ia88265 for ; Sun, 17 Jun 2001 22:03:18 -0400 (EDT) (envelope-from reedstrm@rice.edu) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 7D1A568A14; Sun, 17 Jun 2001 21:03:14 -0500 (CDT) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.22 #1 (Debian)) id 15BoMd-0002ja-00; Sun, 17 Jun 2001 21:02:03 -0500 Date: Sun, 17 Jun 2001 21:02:03 -0500 From: "Ross J. Reedstrom" To: Craig Longman Cc: PostgreSQL SQL List Subject: Re: casts and conversions Message-ID: <20010617210203.A10168@rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , Craig Longman , PostgreSQL SQL List References: <992668049.2128.5.camel@jigra.begeek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <992668049.2128.5.camel@jigra.begeek.com> User-Agent: Mutt/1.3.18i X-Archive-Number: 200106/248 X-Sequence-Number: 3506 On Sat, Jun 16, 2001 at 01:07:29AM -0400, Craig Longman wrote: numeric casts> Tom Lane has already addressed the 'why is it this way' question. I'll address your proposed work arounds. > > the only solution i can think of, if it is possible, is to have a script > that the client would need to run to declare the missing parameter > combinations for the standard operators. this isn't very desireable, > but it is the only real solution i can see so far. any other > suggestions? Yup, that's pretty much the only way to do this. Either run scripts as part of the install, or (if there's a logical place for it in the workflow) you could much around to see if the declarations are already there, and only run the script if their missing. > > why does this happen? i have run into this before, and was able to > perform the explicit cast (the code was postgresql only), but it seems > like this is always going to be a problem, unless i'm missing something. > are there plans for more thorough dynamic-casting logic, or does one Check the HACKERS archives: there've been _long_ discussions about how to do dynimic casting correctly, in the face of a user extensible type system. Not trivial, at all. > just need to go through all the combinations of datatypes and make sure > that every combination is entered in the operator mapping tables? i > guess it would need to be entered both ways also ( int*float8, > float8*int )? I'd test with all the combinations of types you need, then only add enough new mappings to get everything working. Ross