#include "postgres.h"
#include <math.h>
#include "common/pg_prng.h"
#include "miscadmin.h"
#include "utils/date.h"
#include "utils/fmgrprotos.h"
#include "utils/numeric.h"
#include "utils/timestamp.h"
Go to the source code of this file.
Definition at line 33 of file pseudorandomfuncs.c.
Definition at line 203 of file pseudorandomfuncs.c.
References CHECK_RANGE_BOUNDS, DATE_IS_NOBEGIN, DATE_IS_NOEND, ereport, errcode(), errmsg(), ERROR, initialize_prng(), PG_GETARG_DATEADT, pg_prng_int64_range(), PG_RETURN_DATEADT, and prng_state.
Definition at line 97 of file pseudorandomfuncs.c.
References initialize_prng(), pg_prng_double(), PG_RETURN_FLOAT8, and prng_state.
Definition at line 115 of file pseudorandomfuncs.c.
References initialize_prng(), PG_GETARG_FLOAT8, pg_prng_double_normal(), PG_RETURN_FLOAT8, and prng_state.
Definition at line 47 of file pseudorandomfuncs.c.
References GetCurrentTimestamp(), MyProcPid, now(), pg_prng_seed(), pg_prng_strong_seed, prng_seed_set, prng_state, and unlikely.
Referenced by date_random(), drandom(), drandom_normal(), int4random(), int8random(), numeric_random(), timestamp_random(), and timestamptz_random().
Definition at line 139 of file pseudorandomfuncs.c.
References CHECK_RANGE_BOUNDS, initialize_prng(), PG_GETARG_INT32, pg_prng_int64_range(), PG_RETURN_INT32, and prng_state.
Definition at line 160 of file pseudorandomfuncs.c.
References CHECK_RANGE_BOUNDS, initialize_prng(), PG_GETARG_INT64, pg_prng_int64_range(), PG_RETURN_INT64, and prng_state.
Definition at line 181 of file pseudorandomfuncs.c.
References initialize_prng(), PG_GETARG_NUMERIC, PG_RETURN_NUMERIC, prng_state, and random_numeric().
Definition at line 75 of file pseudorandomfuncs.c.
References ereport, errcode(), errmsg(), ERROR, PG_GETARG_FLOAT8, pg_prng_fseed(), PG_RETURN_VOID, prng_seed_set, and prng_state.
Referenced by assign_random_seed().
Definition at line 229 of file pseudorandomfuncs.c.
References CHECK_RANGE_BOUNDS, ereport, errcode(), errmsg(), ERROR, initialize_prng(), PG_GETARG_TIMESTAMP, pg_prng_int64_range(), PG_RETURN_TIMESTAMP, prng_state, TIMESTAMP_IS_NOBEGIN, and TIMESTAMP_IS_NOEND.
Definition at line 255 of file pseudorandomfuncs.c.
References CHECK_RANGE_BOUNDS, ereport, errcode(), errmsg(), ERROR, initialize_prng(), PG_GETARG_TIMESTAMPTZ, pg_prng_int64_range(), PG_RETURN_TIMESTAMPTZ, prng_state, TIMESTAMP_IS_NOBEGIN, and TIMESTAMP_IS_NOEND.
Definition at line 27 of file pseudorandomfuncs.c.
Referenced by initialize_prng(), and setseed().
Definition at line 26 of file pseudorandomfuncs.c.
Referenced by choose_dsm_implementation(), date_random(), drandom(), drandom_normal(), initialize_prng(), int4random(), int8random(), numeric_random(), setseed(), timestamp_random(), and timestamptz_random().