Re: pgsql: Replace random(), pg_erand48(), etc with a better PRNG API and a

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Replace random(), pg_erand48(), etc with a better PRNG API and a
Date: 2021-11-29 04:57:58
Message-ID: 1140657.1638161878@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

I wrote:
> ... If so, we could perhaps
> fix it by doing

> #ifdef FRONTEND
> extern pg_prng_state pg_global_prng_state;
> #else
> extern PGDLLIMPORT pg_prng_state pg_global_prng_state;
> #endif

Ah, I now see the same hack being used in keywords.h and pg_bitutils.h,
so I'll go do that. (Maybe we should invent a variant of PGDLLIMPORT
that can make this happen without as much code duplication?)

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-11-29 05:04:58 pgsql: Portability hack for pg_global_prng_state.
Previous Message Michael Paquier 2021-11-29 04:37:38 pgsql: Centralize timestamp computation of control file on updates