Create a FETCH_COUNT parameter that causes psql to execute SELECT-like
Tom Lane <tgl@sss.pgh.pa.us>
Create a FETCH_COUNT parameter that causes psql to execute SELECT-like queries via a cursor, fetching a limited number of rows at a time and therefore not risking exhausting memory. A disadvantage of the scheme is that 'aligned' output mode will align each group of rows independently leading to odd-looking output, but all the other output formats work reasonably well. Chris Mair, with some additional hacking by moi.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | modified | +28 −1 |
| src/bin/psql/common.c | modified | +274 −24 |
| src/bin/psql/print.c | modified | +538 −454 |
| src/bin/psql/print.h | modified | +7 −3 |
| src/bin/psql/settings.h | modified | +2 −1 |
| src/bin/psql/startup.c | modified | +10 −1 |