postgresql/src
Tom Lane d7c19d6855 Make sampler_random_fract() actually obey its API contract.
This function is documented to return a value in the range (0,1),
which is what its predecessor anl_random_fract() did.  However, the
new version depends on pg_erand48() which returns a value in [0,1).
The possibility of returning zero creates hazards of division by zero
or trying to compute log(0) at some call sites, and it might well
break third-party modules using anl_random_fract() too.  So let's
change it to never return zero.  Spotted by Coverity.

Michael Paquier, cosmetically adjusted by me
2015-07-01 18:07:48 -04:00
..
backend Make sampler_random_fract() actually obey its API contract. 2015-07-01 18:07:48 -04:00
bin Translation updates 2015-06-28 23:56:55 -04:00
common pgindent run for 9.5 2015-05-23 21:35:49 -04:00
include Stamp HEAD as 9.6devel. 2015-06-30 14:01:15 -04:00
interfaces Stamp shared-library minor version numbers for 9.6. 2015-06-30 14:06:04 -04:00
makefiles Fix parallel make risk with new check temp-install setup 2015-04-29 20:34:22 -04:00
pl Translation updates 2015-06-28 23:56:55 -04:00
port Stamp HEAD as 9.6devel. 2015-06-30 14:01:15 -04:00
template Remove duplicate specification of -Ae for HP-UX C compiler. 2015-01-13 22:52:11 -05:00
test Improve design and implementation of pg_file_settings view. 2015-06-28 18:06:14 -04:00
timezone Update time zone data files to tzdata release 2015d. 2015-05-15 19:35:29 -04:00
tools Stamp shared-library minor version numbers for 9.6. 2015-06-30 14:06:04 -04:00
tutorial Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
.gitignore
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in doc build: use unique Makefile variable to control temp install 2015-05-12 12:30:50 -04:00
Makefile.shlib Add transforms feature 2015-04-26 10:33:14 -04:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00