From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | AgentM <agentm(at)cmu(dot)edu> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: convert_numeric_to_scalar: unsupported type 354210 |
Date: | 2003-06-23 14:00:32 |
Message-ID: | 1056376831.63013.15.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)rbt(dot)ca>
PGP Key: http://www.rbt.ca/rbtpub.asc
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2003-06-23 14:07:06 | Re: maxconnection |
Previous Message | Markus Bertheau | 2003-06-23 13:58:20 | multi-table unique index |