Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA31269 for ; Tue, 1 Feb 2000 23:15:40 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id XAA16966; Tue, 1 Feb 2000 23:15:18 -0500 (EST) To: "Ken J. Wright" cc: Thomas Lockhart , pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] problem with numeric In-reply-to: <3.0.1.32.20000201095714.00b16440@ori-ind.com> References: <3.0.1.32.20000201095714.00b16440@ori-ind.com> Comments: In-reply-to "Ken J. Wright" message dated "Tue, 01 Feb 2000 09:57:14 -0800" Date: Tue, 01 Feb 2000 23:15:17 -0500 Message-ID: <16963.949464917@sss.pgh.pa.us> From: Tom Lane "Ken J. Wright" writes: > While testing the new ODBC driver I ran into the following problem with > queries on numeric fields. Unless the values are surrounded by single quote > marks, the query fails with the message: Unable to identify an operator '=' > for types 'numeric' and 'float'. This occurs in the WHERE clause of the > query. > > SELECT * from tbl WHERE numfld = 99.125; > UPDATE tbl SET numfld = 99.13 WHERE numfld = 99.125; This is indubitably a backend bug. It's still there in current sources, too. Possibly related to an item I have on my personal TODO list: : Why is NUMERIC not considered numeric by TypeCategory()? Why is DATE not : considered a datetime type? Isn't this routine fundamentally broken? : If we need a category it should be taken from a pg_type field, not : hardwired in code... Thomas, what say you? regards, tom lane