postgresql/src/bin/pg_amcheck
Tom Lane 4643a2b265 Support retrieval of results in chunks with libpq.
This patch generalizes libpq's existing single-row mode to allow
individual partial-result PGresults to contain up to N rows, rather
than always one row.  This reduces malloc overhead compared to plain
single-row mode, and it is very useful for psql's FETCH_COUNT feature,
since otherwise we'd have to add code (and cycles) to either merge
single-row PGresults into a bigger one or teach psql's
results-printing logic to accept arrays of PGresults.

To avoid API breakage, PQsetSingleRowMode() remains the same, and we
add a new function PQsetChunkedRowsMode() to invoke the more general
case.  Also, PGresults obtained the old way continue to carry the
PGRES_SINGLE_TUPLE status code, while if PQsetChunkedRowsMode() is
used then their status code is PGRES_TUPLES_CHUNK.  The underlying
logic is the same either way, though.

Daniel Vérité, reviewed by Laurenz Albe and myself (and whacked
around a bit by me, so any remaining bugs are my fault)

Discussion: https://postgr.es/m/CAKZiRmxsVTkO928CM+-ADvsMyePmU3L9DQCa9NwqjvLPcEe5QA@mail.gmail.com
2024-04-06 20:45:11 -04:00
..
po Update copyright for 2024 2024-01-03 20:49:05 -05:00
t Escape output of pg_amcheck test 2024-01-13 20:32:18 +01:00
.gitignore Add pg_amcheck, a CLI for contrib/amcheck. 2021-03-12 13:00:01 -05:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
README Doc: improve README files associated with TAP tests. 2021-10-31 18:12:44 -04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls.mk Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_amcheck.c Support retrieval of results in chunks with libpq. 2024-04-06 20:45:11 -04:00

README

src/bin/pg_amcheck/README

pg_amcheck is a command-line tool for running the amcheck extension.

Running the regression tests
============================

NOTE: You must have given the --enable-tap-tests argument to configure.
Also, to use "make installcheck", you must have built and installed
contrib/amcheck and contrib/pageinspect in addition to the core code.

Run
    make check
or
    make installcheck
You can use "make installcheck" if you previously did "make install".
In that case, the code in the installation tree is tested.  With
"make check", a temporary installation tree is built from the current
sources and then tested.

See src/test/perl/README for more info about running these tests.