This function reads the lines from a file and filters its contents to report its head and tail contents. The amount of contents to read from a file can be tuned by the environment variable PG_TEST_FILE_READ_LINES, that can be used to override the default of 50 lines. If the file whose content is read has less lines than two times PG_TEST_FILE_READ_LINES, the whole file is returned. This will be used in a follow-up commit to limit the amount of information reported by some of the TAP tests on failure, where we have noticed that the contents reported by the buildfarm can be heavily bloated in some cases, with the head and tail contents of a report being able to provide enough information to be useful for debugging. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Co-authored-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/CAN55FZ1D6KXvjSs7YGsDeadqCxNF3UUhjRAfforzzP0k-cE=bA@mail.gmail.com
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.