> 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