numeric regression test passes, but why?

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: numeric regression test passes, but why?
Date: 2018-01-11 06:22:49
Message-ID: 5A5702B9.1050704@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2018-01-11 06:36:31 Re: [HACKERS] Planning counters in pg_stat_statements
Previous Message David Rowley 2018-01-11 06:21:19 Re: [HACKERS] Proposal: Local indexes for partitioned table