From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | Philippe Ferreira <phil(dot)f(at)worldonline(dot)fr> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: SELECT with REAL... |
Date: | 2006-02-05 23:01:24 |
Message-ID: | 7F43CF0E-1A5B-4649-9442-3DFAE2D17191@myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Feb 6, 2006, at 7:30 , Philippe Ferreira wrote:
> For example, the following command always returns 0 row, even if
> rows with myreal=10.5 do exist :
> SELECT * FROM mytable WHERE myreal=10.5;
>
> Where am I wrong ?!
Without seeing a more complete example, it's hard to say. It works
for me here:
create table real_test
(
real_label text primary key
, real_value real not null unique
);
copy real_test (real_label, real_value) from stdin;
foo 1.2
bar 10.53
baz 10.5
bat -54.3
\.
test=# select * from real_test;
real_label | real_value
------------+------------
foo | 1.2
bar | 10.53
baz | 10.5
bat | -54.3
(4 rows)
test=# select * from real_test where real_value >= 10.5;
real_label | real_value
------------+------------
bar | 10.53
baz | 10.5
(2 rows)
test=# select * from real_test where real_value = 10.5;
real_label | real_value
------------+------------
baz | 10.5
(1 row)
test=# select version();
version
------------------------------------------------------------------------
----------------------------------------------------------------------
PostgreSQL 8.1.0 on powerpc-apple-darwin8.3.0, compiled by GCC
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc.
build 5026)
(1 row)
Michael Glaesemann
grzm myrealbox com
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Atkins | 2006-02-05 23:31:11 | Re: SELECT with REAL... |
Previous Message | Martijn van Oosterhout | 2006-02-05 22:51:10 | Re: logging settings |