pgsql: Fix overflow when calculating timestamp distance in BRIN

2023-10-27 Thread Tomas Vondra
Fix overflow when calculating timestamp distance in BRIN When calculating distances for timestamp values for BRIN minmax-multi indexes, we need to be careful about overflows for extreme values. If the value overflows into a negative value, the index may be inefficient. The new regression test

pgsql: Fix overflow when calculating timestamp distance in BRIN

2023-10-27 Thread Tomas Vondra
Fix overflow when calculating timestamp distance in BRIN When calculating distances for timestamp values for BRIN minmax-multi indexes, we need to be careful about overflows for extreme values. If the value overflows into a negative value, the index may be inefficient. The new regression test

pgsql: Fix overflow when calculating timestamp distance in BRIN

2023-10-27 Thread Tomas Vondra
Fix overflow when calculating timestamp distance in BRIN When calculating distances for timestamp values for BRIN minmax-multi indexes, we need to be careful about overflows for extreme values. If the value overflows into a negative value, the index may be inefficient. The new regression test

pgsql: Fix overflow when calculating timestamp distance in BRIN

2023-10-27 Thread Tomas Vondra
Fix overflow when calculating timestamp distance in BRIN When calculating distances for timestamp values for BRIN minmax-multi indexes, we need to be careful about overflows for extreme values. If the value overflows into a negative value, the index may be inefficient. The new regression test