mirror of
https://github.com/postgres/postgres.git
synced 2026-05-19 16:57:03 -04:00
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 |
||
|---|---|---|
| .. | ||
| po | ||
| t | ||
| test | ||
| .gitignore | ||
| exports.txt | ||
| fe-auth-sasl.h | ||
| fe-auth-scram.c | ||
| fe-auth.c | ||
| fe-auth.h | ||
| fe-cancel.c | ||
| fe-connect.c | ||
| fe-exec.c | ||
| fe-gssapi-common.c | ||
| fe-gssapi-common.h | ||
| fe-lobj.c | ||
| fe-misc.c | ||
| fe-print.c | ||
| fe-protocol3.c | ||
| fe-secure-common.c | ||
| fe-secure-common.h | ||
| fe-secure-gssapi.c | ||
| fe-secure-openssl.c | ||
| fe-secure.c | ||
| fe-trace.c | ||
| legacy-pqsignal.c | ||
| libpq-events.c | ||
| libpq-events.h | ||
| libpq-fe.h | ||
| libpq-int.h | ||
| Makefile | ||
| meson.build | ||
| nls.mk | ||
| pg_service.conf.sample | ||
| pqexpbuffer.c | ||
| pqexpbuffer.h | ||
| pthread-win32.c | ||
| README | ||
| win32.c | ||
| win32.h | ||
src/interfaces/libpq/README This directory contains the C version of Libpq, the POSTGRES frontend library.