Re: convert_numeric_to_scalar: unsupported type 354210

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: convert_numeric_to_scalar: unsupported type 354210
Дата
Msg-id 1056376831.63013.15.camel@jester
обсуждение исходный текст
Ответ на convert_numeric_to_scalar: unsupported type 354210  (AgentM <agentm@cmu.edu>)
Список pgsql-sql
> select id from data where dec < 2.0;
> ERROR:  convert_numeric_to_scalar: unsupported type 354210

Domains exposed (and introduced) a number of interesting issues in
regards to type switching for these things.

Cast the 2.0 value to the domain:CAST(2.0 AS physreal)

or quote it and let the system figure it out:dec < '2.0'


Simply put, without quotes the parser assumes that 2.0 is a numeric,
which doesn't have a direct < operator for use with the domain.

Another alternative would be to create a new < operator, but thats more
work than it's worth.

This has been fixed for 7.4 (the system implicitly coerces the domain to
numeric for the index comparison).
--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: CREATE table1 FROM table2
Следующее
От: Markus Bertheau
Дата:
Сообщение: multi-table unique index