Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5GGiSa96992 for ; Sat, 16 Jun 2001 12:44:29 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f5GGi7328139; Sat, 16 Jun 2001 12:44:07 -0400 (EDT) To: Craig Longman cc: PostgreSQL SQL List Subject: Re: casts and conversions In-reply-to: <992668049.2128.5.camel@jigra.begeek.com> References: <992668049.2128.5.camel@jigra.begeek.com> Comments: In-reply-to Craig Longman message dated "16 Jun 2001 01:07:29 -0400" Date: Sat, 16 Jun 2001 12:44:07 -0400 Message-ID: <28136.992709847@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200106/233 X-Sequence-Number: 3491 Craig Longman writes: > select (unitcost*probability) from oppproducttype > ERROR: Unable to identify an operator '*' for types 'numeric' and > 'float8' > You will have to retype this query using an explicit cast > is this kind of thing a regular thing for postgresql? The problem here is that we use a very generic, datatype-independent algorithm for resolving operator type ambiguities. It's nice and extensible, which is great for user-defined datatypes ... but there's really no way to handle all the standard numeric datatypes in an intuitive fashion without introducing type-specific knowledge. We've had discussions about fixing this in the past (see e.g. pghackers archives from last May & June), but we've not yet come up with a solution that satisfies everyone. It's still on the to-do list though. regards, tom lane