Re: [HACKERS] float8 regression test failure in head

2006-04-20 Thread Tom Lane
Patrick Welche <[EMAIL PROTECTED]> writes:
>>> canary, gazelle, and osprey all pass this test just fine.  Before
>>> accepting any patches in this area we'd better find out the difference
>>> between the OP's netbsd system and those machines.

> Quoting from my original post "NetBSD-3.99.17/i386" - so what are you
> running?

http://www.pgbuildfarm.org/cgi-bin/show_members.pl

The entries in the buildfarm list say things like "NetBSD 3.0".  Is 3.99
newer?  If so, has its underflow handling changed?

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [HACKERS] float8 regression test failure in head

2006-04-20 Thread Patrick Welche
On Thu, Apr 20, 2006 at 11:56:29AM -0400, Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian  writes:
> > > Don't we have some of these platforms on the build farm.  Are they
> > > failing?
> > 
> > canary, gazelle, and osprey all pass this test just fine.  Before
> > accepting any patches in this area we'd better find out the difference
> > between the OP's netbsd system and those machines.
> 
> Agreed.

Quoting from my original post "NetBSD-3.99.17/i386" - so what are you
running?

.. and just to check:

patrimoine=# select '1e-400'::float;
ERROR:  "1e-400" is out of range for type double precision
patrimoine=# select version();
   version  
 
-
 PostgreSQL 8.2devel on i386-unknown-netbsdelf3.99.17, compiled by GCC gcc 
(GCC) 3.3.3 (NetBSD nb3 20040520)
(1 row)


1e-400 wasn't rounded down to 0.



Cheers,

Patrick

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [HACKERS] float8 regression test failure in head

2006-04-20 Thread Bruce Momjian
Tom Lane wrote:
> Bruce Momjian  writes:
> > Don't we have some of these platforms on the build farm.  Are they
> > failing?
> 
> canary, gazelle, and osprey all pass this test just fine.  Before
> accepting any patches in this area we'd better find out the difference
> between the OP's netbsd system and those machines.

Agreed.

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [HACKERS] float8 regression test failure in head

2006-04-20 Thread Tom Lane
Bruce Momjian  writes:
> Don't we have some of these platforms on the build farm.  Are they
> failing?

canary, gazelle, and osprey all pass this test just fine.  Before
accepting any patches in this area we'd better find out the difference
between the OP's netbsd system and those machines.

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [HACKERS] float8 regression test failure in head

2006-04-20 Thread Bruce Momjian
Patrick Welche wrote:
> On Mon, Mar 22, 2004 at 11:03:38PM -0500, Neil Conway wrote:
> > Christopher Kings-Lynne wrote:
> > >This has not yet been fixed...
> > 
> > Attached is a patch for this issue. I've checked with Chris, and this 
> > patch allows the regression tests to pass on his machine. I also 
> > updated float8-exp-three-digits expected file, but I wasn't able to 
> > test these changes (I don't have access to a QNX machine).
> 
> Mystery: why I haven't I seen this problem before in the last 2 years...
> Anyway, on NetBSD-3.99.17/i386, I need the included patch to pass float8.
> float8-small-is-zero_1.out probably needs it too, float8.out and
> float8-exp-three-digits-win32.out already look OK.

You realize that all these platforms use the same file:

float8/i.86-.*-freebsd[234]=float8-small-is-zero
float8/i.86-.*-openbsd=float8-small-is-zero
float8/i.86-.*-netbsd=float8-small-is-zero
float8/m68k-.*-netbsd=float8-small-is-zero

Are we going to have to make a NetBSD/i386-specific file to fix this?
Don't we have some of these platforms on the build farm.  Are they
failing?

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] float8 regression test failure in head

2006-04-05 Thread Patrick Welche
On Mon, Mar 22, 2004 at 11:03:38PM -0500, Neil Conway wrote:
> Christopher Kings-Lynne wrote:
> >This has not yet been fixed...
> 
> Attached is a patch for this issue. I've checked with Chris, and this 
> patch allows the regression tests to pass on his machine. I also 
> updated float8-exp-three-digits expected file, but I wasn't able to 
> test these changes (I don't have access to a QNX machine).

Mystery: why I haven't I seen this problem before in the last 2 years...
Anyway, on NetBSD-3.99.17/i386, I need the included patch to pass float8.
float8-small-is-zero_1.out probably needs it too, float8.out and
float8-exp-three-digits-win32.out already look OK.

Cheers,

Patrick
Index: float8-small-is-zero.out
===
RCS file: 
/projects/cvsroot/pgsql/src/test/regress/expected/float8-small-is-zero.out,v
retrieving revision 1.10
diff -u -r1.10 float8-small-is-zero.out
--- float8-small-is-zero.out8 Jun 2005 21:15:29 -   1.10
+++ float8-small-is-zero.out5 Apr 2006 14:26:25 -
@@ -13,17 +13,9 @@
 SELECT '-10e400'::float8;
 ERROR:  "-10e400" is out of range for type double precision
 SELECT '10e-400'::float8;
- float8 
-
- 0
-(1 row)
-
+ERROR:  "10e-400" is out of range for type double precision
 SELECT '-10e-400'::float8;
- float8 
-
--0
-(1 row)
-
+ERROR:  "-10e-400" is out of range for type double precision
 -- bad input
 INSERT INTO FLOAT8_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for type double precision: ""
@@ -377,7 +369,9 @@
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
 ERROR:  "-10e400" is out of range for type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
+ERROR:  "10e-400" is out of range for type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
+ERROR:  "-10e-400" is out of range for type double precision
 -- maintain external table consistency across platforms
 -- delete all values and reinsert well-behaved ones
 DELETE FROM FLOAT8_TBL;

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] float8 regression test failure in head

2004-03-22 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes:
> Attached is a patch for this issue. I've checked with Chris, and this 
> patch allows the regression tests to pass on his machine. I also 
> updated float8-exp-three-digits expected file, but I wasn't able to 
> test these changes (I don't have access to a QNX machine).

FWIW, my procedure for handling updates in regression tests that have
multiple expected variants is to apply the same diff that occurs on the
machines I can test to the variants I can't test.  It's possible that
this will be wrong, but 99% of the time it's right and it saves followup
work.

An easy way to apply such changes is to feed a default-format diff
output to patch(1):

diff test.myplatform.orig test.myplatform | patch

patch then bleats about not knowing which file to patch, and you
tell it "test.otherplatform".  Works every time ...

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] float8 regression test failure in head

2004-03-22 Thread Neil Conway
Christopher Kings-Lynne wrote:
This has not yet been fixed...
Attached is a patch for this issue. I've checked with Chris, and this 
patch allows the regression tests to pass on his machine. I also 
updated float8-exp-three-digits expected file, but I wasn't able to 
test these changes (I don't have access to a QNX machine).

I intend to apply this patch tomorrow.

Cheers,

Neil
Index: src/test/regress/expected/float8-exp-three-digits-win32.out
===
RCS file: /var/lib/cvs/pgsql-server/src/test/regress/expected/float8-exp-three-digits-win32.out,v
retrieving revision 1.2
diff -c -r1.2 float8-exp-three-digits-win32.out
*** a/src/test/regress/expected/float8-exp-three-digits-win32.out	15 Mar 2004 16:20:52 -	1.2
--- b/src/test/regress/expected/float8-exp-three-digits-win32.out	23 Mar 2004 03:13:54 -
***
*** 7,20 
  INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');
! -- test for underflow and overflow
! INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
  ERROR:  "10e400" is out of range for type double precision
! INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
  ERROR:  "-10e400" is out of range for type double precision
! INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
  ERROR:  "10e-400" is out of range for type double precision
! INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
  ERROR:  "-10e-400" is out of range for type double precision
  -- bad input
  INSERT INTO FLOAT8_TBL(f1) VALUES (' ');
--- 7,20 
  INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');
! -- test for underflow and overflow handling
! SELECT '10e400'::float8;
  ERROR:  "10e400" is out of range for type double precision
! SELECT '-10e400'::float8;
  ERROR:  "-10e400" is out of range for type double precision
! SELECT '10e-400'::float8;
  ERROR:  "10e-400" is out of range for type double precision
! SELECT '-10e-400'::float8;
  ERROR:  "-10e-400" is out of range for type double precision
  -- bad input
  INSERT INTO FLOAT8_TBL(f1) VALUES (' ');
Index: src/test/regress/expected/float8-exp-three-digits.out
===
RCS file: /var/lib/cvs/pgsql-server/src/test/regress/expected/float8-exp-three-digits.out,v
retrieving revision 1.7
diff -c -r1.7 float8-exp-three-digits.out
*** a/src/test/regress/expected/float8-exp-three-digits.out	25 Sep 2003 16:16:34 -	1.7
--- b/src/test/regress/expected/float8-exp-three-digits.out	23 Mar 2004 03:20:50 -
***
*** 2,12 
  -- FLOAT8
  --
  CREATE TABLE FLOAT8_TBL(f1 float8);
! INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0');
! INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30');
! INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');
  SELECT '' AS five, FLOAT8_TBL.*;
   five |  f1  
  --+--
--- 2,87 
  -- FLOAT8
  --
  CREATE TABLE FLOAT8_TBL(f1 float8);
! INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0   ');
! INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30  ');
! INSERT INTO FLOAT8_TBL(f1) VALUES ('   -34.84');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');
+ -- test for underflow and overflow handling
+ SELECT '10e400'::float8;
+ ERROR:  "10e400" is out of range for type double precision
+ SELECT '-10e400'::float8;
+ ERROR:  "-10e400" is out of range for type double precision
+ SELECT '10e-400'::float8;
+ ERROR:  "10e-400" is out of range for type double precision
+ SELECT '-10e-400'::float8;
+ ERROR:  "-10e-400" is out of range for type double precision
+ -- bad input
+ INSERT INTO FLOAT8_TBL(f1) VALUES (' ');
+ ERROR:  invalid input syntax for type double precision: " "
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
+ ERROR:  invalid input syntax for type double precision: "xyz"
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
+ ERROR:  invalid input syntax for type double precision: "5.0.0"
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
+ ERROR:  invalid input syntax for type double precision: "5 . 0"
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
+ ERROR:  invalid input syntax for type double precision: "5.   0"
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('- 3');
+ ERROR:  invalid input syntax for type double precision: "- 3"
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('123   5');
+ ERROR:  invalid input syntax for type double precision: "123   5"
+ -- special inputs
+ SELECT 'NaN'::float8;
+  float8
+ 
+ NaN
+ (1 row)
+ SELECT 'nan'::float8;
+  float8
+ 
+ NaN
+ (1 row)
+ 
+ SELECT '   NAN  '::float8;
+  float8
+ 
+ NaN
+ (1 row)
+ 
+

Re: [HACKERS] float8 regression test failure in head

2004-03-22 Thread Christopher Kings-Lynne
This has not yet been fixed...

Chris

Tom Lane wrote:

Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:

Attached are the test failures I'm currently getting.


It looks like Neil didn't update expected/float8-small-is-zero.out
for his recent changes (for which, shame on him).  Would you get
together to verify the correct regression outputs for your platform
and commit the updated expected file?
			regards, tom lane
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] float8 regression test failure in head

2004-03-17 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
> Attached are the test failures I'm currently getting.

It looks like Neil didn't update expected/float8-small-is-zero.out
for his recent changes (for which, shame on him).  Would you get
together to verify the correct regression outputs for your platform
and commit the updated expected file?

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[HACKERS] float8 regression test failure in head

2004-03-17 Thread Christopher Kings-Lynne
Attached are the test failures I'm currently getting.

-bash-2.05b$ uname -a
FreeBSD mir.internal 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Mon Sep 
22 14:46:18 WST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MIR  i386

Chris

parallel group (13 tests):  text name char varchar oid boolean int2 int8 int4 float4 
bit float8 numeric
 boolean  ... ok
 char ... ok
 name ... ok
 varchar  ... ok
 text ... ok
 int2 ... ok
 int4 ... ok
 int8 ... ok
 oid  ... ok
 float4   ... ok
 float8   ... FAILED
 bit  ... ok
 numeric  ... ok
test strings  ... ok
test numerology   ... ok
parallel group (20 tests):  comments lseg time path timetz reltime circle tinterval 
box abstime point polygon interval timestamp inet type_sanity date timestamptz 
oidjoins opr_sanity
 point... ok
 lseg ... ok
 box  ... ok
 path ... ok
 polygon  ... ok
 circle   ... ok
 date ... ok
 time ... ok
 timetz   ... ok
 timestamp... ok
 timestamptz  ... ok
 interval ... ok
 abstime  ... ok
 reltime  ... ok
 tinterval... ok
 inet ... ok
 comments ... ok
 oidjoins ... ok
 type_sanity  ... ok
 opr_sanity   ... ok
test geometry ... ok
test horology ... ok
test insert   ... ok
test create_function_1... ok
test create_type  ... ok
test create_table ... ok
test create_function_2... ok
test copy ... ok
parallel group (7 tests):  create_operator create_aggregate vacuum triggers 
create_misc inherit constraints
 constraints  ... ok
 triggers ... ok
 create_misc  ... ok
 create_aggregate ... ok
 create_operator  ... ok
 inherit  ... ok
 vacuum   ... ok
parallel group (2 tests):  create_view create_index
 create_index ... ok
 create_view  ... ok
test sanity_check ... ok
test errors   ... ok
test select   ... ok
parallel group (18 tests):  select_distinct_on select_into update random btree_index 
namespace select_having select_distinct hash_index aggregates case transactions 
select_implicit union subselect arrays portals join
 select_into  ... ok
 select_distinct  ... ok
 select_distinct_on   ... ok
 select_implicit  ... ok
 select_having... ok
 subselect... ok
 union... ok
 case ... ok
 join ... ok
 aggregates   ... ok
 transactions ... ok
 random   ... ok
 portals  ... ok
 arrays   ... ok
 btree_index  ... ok
 hash_index   ... ok
 update   ... ok
 namespace... ok
test privileges   ... ok
test misc ... ok
parallel group (5 tests):  select_views portals_p2 cluster foreign_key rules
 select_views ... ok
 portals_p2   ... ok
 rules... ok
 foreign_key  ... ok
 cluster  ... ok
parallel group (13 tests):  limit prepare copy2 domain truncate sequence rangefuncs 
temp polymorphism without_oid conversion plpgsql alter_table
 limit... ok
 plpgsql  ... ok
 copy2... ok
 temp ... ok
 domain   ... ok
 rangefuncs   ... ok
 prepare  ... ok
 without_oid  ... ok
 conversion   ... ok
 truncate ... ok
 alter_table  ... ok
 sequence ... ok
 polymorphism ... ok
test stats... ok
*** ./expected/float8-small-is-zero.out Fri Sep 26 00:16:34 2003
--- ./results/float8.outThu Mar 18 11:26:20 2004
***
*** 7,12 
--- 7,86 
  INSERT INTO FLOAT8_TBL(f1) VALUES ('   -34.84');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200');
  INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');
+ -- test for underflow and overflow
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
+ ERROR:  "10e400" is out of range for type double precision
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
+ ERROR:  "-10e400" is out of range for type double precision
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
+ -- bad input
+ INSERT INTO FLOAT8_TBL(f1) VALUES (' ');
+ ERROR: