Re: Comparing different numeric data types

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Comparing different numeric data types
Дата
Msg-id 20030203104348.E17659@mail.libertyrms.com
обсуждение исходный текст
Ответ на Comparing different numeric data types  (Vicente Alabau Gonzalvo <vicente.alabau-gonzalvo@cgey.com>)
Список pgsql-general
On Fri, Jan 31, 2003 at 01:21:54PM +0100, Vicente Alabau Gonzalvo wrote:
> I don't know if it's the right place for posting this thing.
> Maybe sql list be better, but here it is.
>
> It seems not to be possible to compare different numeric data types
> such as numeric and double precision. I get this error:
>
> Unable to identify an operator '<=' for types 'numeric' and 'double
> precision'
>
> Is it planned to do this comparissions in the future?
>
> It's possible to make a cast but I don't like this approach.
> It would be better if can be made transparently.

There have been reams of discussion about automatic coercion.  Have a
look through the archives.

One thing you might try is to put both values in single quotes.
They'll make it into the system as text, and the system will probably
pick a reasonably sane type for them at the time of comparison.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


В списке pgsql-general по дате отправления:

Предыдущее
От: mjoseph@inautix.com
Дата:
Сообщение: Database access problem : SOS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [ADMIN] Database access problem : SOS