From: | "Johann Zuschlag" <zuschlag(at)online(dot)de> |
---|---|
To: | "Mike Finn" <mike(dot)finn(at)tacticalExecutive(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Comparing fixed precision to floating (no anwer) |
Date: | 2001-08-22 20:43:03 |
Message-ID: | E15ZeqI-0008JW-00@mrelay01.kundenserver.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc |
On Tue, 21 Aug 2001 15:41:22 -0600, Mike Finn wrote:
>I am using numeric(p,s) fields in a database schema.
>Using queries that contain a comparison like
>
> ...
> where numericField = 456.789
> ....
>
>will generate an error
>
> Unable to identify an operator '=' for types 'numeric' and 'float8'
> You will have to retype this query using an explicit cast
I have the same problem but nobody seems to understand
that you can't always change the query like in my case,
where a comercial app. sends the query.
I tried the following with no avail.
create function numeric_eq(numeric,float8)
returns bool
as ''
language 'internal';
create operator = (
leftarg=numeric,
rightarg=float8,
procedure=numeric_eq,
commutator='=',
negator='<>',
restrict=eqsel,
join=eqjoinsel
);
The Problem is: It doesn't work and the backend process crashes and get's restarted.
I tried it with 7.03 and I guess 7.1.3 behaves the same.
Do you have any ideas? I agree, that should work in postresql.
regards
Johann
Johann Zuschlag
zuschlag(at)online(dot)de
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Pilsl | 2001-08-22 21:50:38 | current_timestamp wrong |
Previous Message | Pete Leonard | 2001-08-22 20:34:36 | Error reporting when hitting shared memory limits - |
From | Date | Subject | |
---|---|---|---|
Next Message | Nick Fankhauser | 2001-08-22 21:45:14 | Re: Accessing multiple Databases at the same time |
Previous Message | Bruce Momjian | 2001-08-22 20:04:58 | Re: Re: Couple of patches for jdbc driver |