pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedComparing Numeric and Double Precision (float8)..
3+ messages / 2 participants
[nested] [flat]
* Comparing Numeric and Double Precision (float8)..
@ 2002-11-04 08:11 Terry Yapt <pgsql@technovell.com>
0 siblings, 1 reply; 3+ messages in thread
From: Terry Yapt @ 2002-11-04 08:11 UTC (permalink / raw)
To: pgsql-sql
Hello all,
i DON'T know what is the proper forum to throw this question and I must
to insist in this "feature". Sorry.
I have a lot of tables from Oracle 8i Databases with a lot of columns
with numeric(x,0) definition.
Ok.. I am traslating my oracle tables to PostgreSQL tables. But I am
having a serious problem with my client aplications.
When I compare a numeric(x,0) field with a float8 field I have an error
on PostgreSQL what I didn't have with Oracle. I mean:
CREATE test (one numeric(2,0));
SELECT * FROM test WHERE one = 1.00000;
This runs fine on my Oracle Systems.. but I have problems with my
PostgreSQL system. I have tried to create an operator to workaround
this inconvenience:
numeric '=' float8
with CREATE OPERATOR command and calling to a function to return a
boolean.
Ok.. great.. It is running now. But when it runs.. I have another
problems comparing numeric with integers and so on. So I must to DROP
OPERATOR......
I don't understand what is the problem and what options I have to
workaround it (without re-write a lot of client applications).
I have a lot of code I don't want to modify. The question is:
Why we cannot compare numeric with double precision ? And why Oracle or
SQL can do it without problems ?
Thanks a lot.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Comparing Numeric and Double Precision (float8)..
@ 2002-11-04 13:45 Bruno Wolff III <bruno@wolff.to>
parent: Terry Yapt <pgsql@technovell.com>
0 siblings, 1 reply; 3+ messages in thread
From: Bruno Wolff III @ 2002-11-04 13:45 UTC (permalink / raw)
To: Terry Yapt <pgsql@technovell.com>; +Cc: pgsql-sql
On Mon, Nov 04, 2002 at 09:11:30 +0100,
Terry Yapt <pgsql@technovell.com> wrote:
>
> When I compare a numeric(x,0) field with a float8 field I have an error
> on PostgreSQL what I didn't have with Oracle. I mean:
>
> CREATE test (one numeric(2,0));
>
> SELECT * FROM test WHERE one = 1.00000;
With 7.3b3 the above works after correcting the create statement.
bruno=> create table test (one numeric(2,0));
CREATE TABLE
bruno=> SELECT * FROM test WHERE one = 1.00000;
one
-----
(0 rows)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Comparing Numeric and Double Precision (float8)..
@ 2002-11-04 14:35 Terry Yapt <pgsql@technovell.com>
parent: Bruno Wolff III <bruno@wolff.to>
0 siblings, 0 replies; 3+ messages in thread
From: Terry Yapt @ 2002-11-04 14:35 UTC (permalink / raw)
To: Bruno Wolff III <bruno@wolff.to>; +Cc: pgsql-sql
Great....
I don't know if my customers can wait until 7.3 official release, but
I'll try to distract them a bit... :-\
Thanks a lot Bruno...
Bruno Wolff III wrote:
>
> On Mon, Nov 04, 2002 at 09:11:30 +0100,
> Terry Yapt <pgsql@technovell.com> wrote:
> >
> > When I compare a numeric(x,0) field with a float8 field I have an error
> > on PostgreSQL what I didn't have with Oracle. I mean:
> >
> > CREATE test (one numeric(2,0));
> >
> > SELECT * FROM test WHERE one = 1.00000;
>
> With 7.3b3 the above works after correcting the create statement.
> bruno=> create table test (one numeric(2,0));
> CREATE TABLE
> bruno=> SELECT * FROM test WHERE one = 1.00000;
> one
> -----
> (0 rows)
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-11-04 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-04 08:11 Comparing Numeric and Double Precision (float8).. Terry Yapt <pgsql@technovell.com>
2002-11-04 13:45 ` Bruno Wolff III <bruno@wolff.to>
2002-11-04 14:35 ` Terry Yapt <pgsql@technovell.com>
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