X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 0771F30F69B for ; Mon, 23 Jun 2003 17:20:18 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 19690-03 for ; Mon, 23 Jun 2003 14:20:07 -0300 (ADT) Received: from www.postgresql.com (www.postgresql.com [64.117.225.209]) by svr1.postgresql.org (Postfix) with ESMTP id 0DAB330F6FE for ; Mon, 23 Jun 2003 14:19:13 -0300 (ADT) Received: from tomts5-srv.bellnexxia.net (tomts5.bellnexxia.net [209.226.175.25]) by www.postgresql.com (Postfix) with ESMTP id E48C2CF6E37 for ; Mon, 23 Jun 2003 11:02:06 -0300 (ADT) Received: from [10.0.2.10] ([216.208.117.7]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030623140010.ZTH23206.tomts5-srv.bellnexxia.net@[10.0.2.10]>; Mon, 23 Jun 2003 10:00:10 -0400 Subject: Re: convert_numeric_to_scalar: unsupported type 354210 From: Rod Taylor To: AgentM Cc: pgsql-sql@postgresql.org In-Reply-To: <1BDD614C-A552-11D7-A47E-0030657192DA@cmu.edu> References: <1BDD614C-A552-11D7-A47E-0030657192DA@cmu.edu> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-JSNIJeNzFRcqZNqYedkc" Message-Id: <1056376831.63013.15.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 23 Jun 2003 10:00:32 -0400 X-Archive-Number: 200306/267 X-Sequence-Number: 14025 --=-JSNIJeNzFRcqZNqYedkc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > 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). --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-JSNIJeNzFRcqZNqYedkc Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA+9wf/6DETLow6vwwRArrhAJ98UD+lF+jq8um+vyIYeAn0DdTH2ACfY+WQ iv5x+nDtF1g9p5wuuhPVcC0= =L7qZ -----END PGP SIGNATURE----- --=-JSNIJeNzFRcqZNqYedkc--