pgsql: Rewrite ExecPartitionCheckEmitError for clarity

2018-12-28 Thread Alvaro Herrera
Rewrite ExecPartitionCheckEmitError for clarity The original was hard to follow and failed to comply with DRY principle. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e8b0e6b82dbdb4459

pgsql: Fix thinko in previous commit

2018-12-28 Thread Alvaro Herrera
Fix thinko in previous commit Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4ed6c071b82a80fb7d8396477a5d698de3c93bf3 Modified Files -- src/backend/executor/execMain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: Fix latent problem with pg_jrand48().

2018-12-28 Thread Tom Lane
Fix latent problem with pg_jrand48(). POSIX specifies that jrand48() returns a signed 32-bit value (in the range [-2^31, 2^31)), but our code was returning an unsigned 32-bit value (in the range [0, 2^32)). This doesn't actually matter to any existing call site, because they all cast the "long" r

pgsql: Fix latent problem with pg_jrand48().

2018-12-28 Thread Tom Lane
Fix latent problem with pg_jrand48(). POSIX specifies that jrand48() returns a signed 32-bit value (in the range [-2^31, 2^31)), but our code was returning an unsigned 32-bit value (in the range [0, 2^32)). This doesn't actually matter to any existing call site, because they all cast the "long" r

pgsql: Fix latent problem with pg_jrand48().

2018-12-28 Thread Tom Lane
Fix latent problem with pg_jrand48(). POSIX specifies that jrand48() returns a signed 32-bit value (in the range [-2^31, 2^31)), but our code was returning an unsigned 32-bit value (in the range [0, 2^32)). This doesn't actually matter to any existing call site, because they all cast the "long" r

pgsql: Marginal performance hacking in erand48.c.

2018-12-28 Thread Tom Lane
Marginal performance hacking in erand48.c. Get rid of the multiplier and addend variables in favor of hard-wired constants. Do the multiply-and-add using uint64 arithmetic, rather than manually combining several narrower multiplications and additions. Make _dorand48 return the full-width new rand

pgsql: Improve description of DEFAULT_XLOG_SEG_SIZE in pg_config.h

2018-12-28 Thread Michael Paquier
Improve description of DEFAULT_XLOG_SEG_SIZE in pg_config.h This was incorrectly referring to --walsegsize, and its description is rewritten in a clearer way. Author: Ian Barwick, Tom Lane Reviewed-by: Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/08534fc6-119a-c498-254e-d5acc4

pgsql: Improve description of DEFAULT_XLOG_SEG_SIZE in pg_config.h

2018-12-28 Thread Michael Paquier
Improve description of DEFAULT_XLOG_SEG_SIZE in pg_config.h This was incorrectly referring to --walsegsize, and its description is rewritten in a clearer way. Author: Ian Barwick, Tom Lane Reviewed-by: Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/08534fc6-119a-c498-254e-d5acc4