From: Tom Lane <tgl@sss.pgh.pa.us>
To: Craig Longman <craigl@begeek.com>
Cc: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: Re: casts and conversions
Date: Sat, 16 Jun 2001 12:44:07 -0400
Message-ID: <28136.992709847@sss.pgh.pa.us> (raw)
In-Reply-To: <992668049.2128.5.camel@jigra.begeek.com>
References: <992668049.2128.5.camel@jigra.begeek.com>
Craig Longman <craigl@begeek.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, craigl@begeek.com
Subject: Re: casts and conversions
In-Reply-To: <28136.992709847@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox