numeric regression test passes, but why? - Mailing list pgsql-hackers

From Chapman Flack
Subject numeric regression test passes, but why?
Date
Msg-id 5A5702B9.1050704@anastigmatix.net
Whole thread Raw
Responses Re: numeric regression test passes, but why?
List pgsql-hackers
I see there are some tests in src/test/regress:

sql/numeric.sql
expected/numeric.out

They pass. I see "numeric ... ok" in a make check.

I do not doubt they are being run, because if I edit numeric.sql
and fudge some digits, say around

-- cases that used to error out
select 0.12 ^ (-25);
select 0.5678 ^ (-85);

and I change the -25 to -26, numeric then fails in my next make check.

All that seems just as it should be. Why, then, if I try to duplicate
those exact tests in an interactive session, would this happen:

postgres=# select 0.12 ^ (-25);
ERROR:  division by zero
STATEMENT:  select 0.12 ^ (-25);

postgres=# select 0.5678 ^ (-85);
ERROR:  division by zero
STATEMENT:  select 0.5678 ^ (-85);

... they error out, that is, do exactly the thing the tests are there
to make sure they do not.

Is there some special GUC setting in effect during the make check
that would be different in my ordinary session? What else could
be different? This is making me question my sanity.

-Chap


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table
Next
From: Haribabu Kommi
Date:
Subject: Re: [HACKERS] Planning counters in pg_stat_statements