aboutsummaryrefslogtreecommitdiff
path: root/contrib/intarray/_int_gist.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-06-09 11:56:43 +0900
committerMichael Paquier <michael@paquier.xyz>2023-06-09 11:56:43 +0900
commita9231fedae7a840433bb8eacc211b8e2b5f8893e (patch)
tree2c771e6911f84e7f1d2929b6840cf4f7be33a5d6 /contrib/intarray/_int_gist.c
parent1536e321e65d5fbee41c45876622fe40ae20e68b (diff)
downloadpostgresql-a9231fedae7a840433bb8eacc211b8e2b5f8893e.tar.gz
postgresql-a9231fedae7a840433bb8eacc211b8e2b5f8893e.zip
Refactor routine to find single log content pattern in TAP tests
The same routine to check if a specific pattern can be found in the server logs was copied over four different test scripts. This refactors the whole to use a single routine located in PostgreSQL::Test::Cluster, named log_contains, to grab the contents of the server logs and check for a specific pattern. On HEAD, the code previously used assumed that slurp_file() could not handle an undefined offset, setting it to zero, but slurp_file() does do an extra fseek() before retrieving the log contents only if an offset is defined. In two places, the test was retrieving the full log contents with slurp_file() after calling substr() to apply an offset, ignoring that slurp_file() would be able to handle that. Backpatch all the way down to ease the introduction of new tests that could rely on the new routine. Author: Vignesh C Reviewed-by: Andrew Dunstan, Dagfinn Ilmari Mannsåker, Michael Paquier Discussion: https://postgr.es/m/CALDaNm0YSiLpjCmajwLfidQrFOrLNKPQir7s__PeVvh9U3uoTQ@mail.gmail.com Backpatch-through: 11
Diffstat (limited to 'contrib/intarray/_int_gist.c')
0 files changed, 0 insertions, 0 deletions