pgsql: Ensure we preprocess expressions before checking their volatilit

2023-11-16 Thread Tom Lane
Ensure we preprocess expressions before checking their volatility. contain_mutable_functions and contain_volatile_functions give reliable answers only after expression preprocessing (specifically eval_const_expressions). Some places understand this, but some did not get the memo --- which is not

pgsql: Ensure we preprocess expressions before checking their volatilit

2023-11-16 Thread Tom Lane
Ensure we preprocess expressions before checking their volatility. contain_mutable_functions and contain_volatile_functions give reliable answers only after expression preprocessing (specifically eval_const_expressions). Some places understand this, but some did not get the memo --- which is not

pgsql: Ensure we preprocess expressions before checking their volatilit

2023-11-16 Thread Tom Lane
Ensure we preprocess expressions before checking their volatility. contain_mutable_functions and contain_volatile_functions give reliable answers only after expression preprocessing (specifically eval_const_expressions). Some places understand this, but some did not get the memo --- which is not

pgsql: Ensure we preprocess expressions before checking their volatilit

2023-11-16 Thread Tom Lane
Ensure we preprocess expressions before checking their volatility. contain_mutable_functions and contain_volatile_functions give reliable answers only after expression preprocessing (specifically eval_const_expressions). Some places understand this, but some did not get the memo --- which is not

pgsql: Ensure we preprocess expressions before checking their volatilit

2023-11-16 Thread Tom Lane
Ensure we preprocess expressions before checking their volatility. contain_mutable_functions and contain_volatile_functions give reliable answers only after expression preprocessing (specifically eval_const_expressions). Some places understand this, but some did not get the memo --- which is not

pgsql: Ensure we preprocess expressions before checking their volatilit

2023-11-16 Thread Tom Lane
Ensure we preprocess expressions before checking their volatility. contain_mutable_functions and contain_volatile_functions give reliable answers only after expression preprocessing (specifically eval_const_expressions). Some places understand this, but some did not get the memo --- which is not

pgsql: pgcrypto: Split off pgp-encrypt-md5 test

2023-11-16 Thread Peter Eisentraut
pgcrypto: Split off pgp-encrypt-md5 test In FIPS mode, these tests will fail. By having them in a separate file, it would make it easier to have an alternative output file or selectively disable these tests. This isn't done here; this is just some preparation. Reviewed-by: Tom Lane Discussion:

pgsql: Remove NOT_USED BufFileTellBlock() from buffile.c

2023-11-16 Thread Michael Paquier
Remove NOT_USED BufFileTellBlock() from buffile.c This routine has been marked as NOT_USED since 20ad43b576d9 from 2000, and a patch is planned to switch the logtape/tuplestore APIs to rely on int64 rather than long for the block nunbers, which is more portable. Keeping it is more confusing than

pgsql: Change logtape/tuplestore code to use int64 for block numbers

2023-11-16 Thread Michael Paquier
Change logtape/tuplestore code to use int64 for block numbers The code previously relied on "long" as type to track block numbers, which would be 4 bytes in all Windows builds or any 32-bit builds. This limited the code to be able to handle up to 16TB of data with the default block size of 8kB, l