Re-implement psql's FETCH_COUNT feature atop libpq's chunked mode.
authorTom Lane
Sun, 7 Apr 2024 00:45:05 +0000 (20:45 -0400)
committerTom Lane
Sun, 7 Apr 2024 00:45:11 +0000 (20:45 -0400)
commit90f5178211cd63ac16fb8c8b2fe43d53d2854da1
tree8cd29b9638ca5df011b85f6eb3e157834f3b81b5
parent4643a2b265e967cc5f13ffa0c7c6912dbb3466d0
Re-implement psql's FETCH_COUNT feature atop libpq's chunked mode.

Formerly this was done with a cursor, which is problematic since
not all result-set-returning query types can be put into a cursor.
The new implementation is better integrated into other psql
features, too.

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
src/bin/psql/common.c
src/bin/psql/t/001_basic.pl
src/test/regress/expected/psql.out
src/test/regress/sql/psql.sql