From: Rod Taylor <rbt@rbt.ca>
To: AgentM <agentm@cmu.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: convert_numeric_to_scalar: unsupported type 354210
Date: 23 Jun 2003 10:00:32 -0400
Message-ID: <1056376831.63013.15.camel@jester> (raw)
In-Reply-To: <1BDD614C-A552-11D7-A47E-0030657192DA@cmu.edu>
References: <1BDD614C-A552-11D7-A47E-0030657192DA@cmu.edu>
> 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.ascAttachments:
signature.asc (application/pgp-signature, 186B) download
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: rbt@rbt.ca, agentm@cmu.edu
Subject: Re: convert_numeric_to_scalar: unsupported type 354210
In-Reply-To: <1056376831.63013.15.camel@jester>
* 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