Rethink API for pg_get_line.c, one more time.
Tom Lane <tgl@sss.pgh.pa.us>
Rethink API for pg_get_line.c, one more time. Further experience says that the appending behavior offered by pg_get_line_append is useful to only a very small minority of callers. For most, the requirement to reset the buffer after each line is just an error-prone nuisance. Hence, invent another alternative call pg_get_line_buf, which takes care of that detail. Noted while reviewing a patch from Daniel Gustafsson. Discussion: https://postgr.es/m/48A4FA71-524E-41B9-953A-FD04EF36E2E7@yesql.se
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/initdb/initdb.c | modified | +1 −3 |
| src/common/pg_get_line.c | modified | +28 −1 |
| src/include/common/string.h | modified | +1 −0 |
| src/interfaces/ecpg/test/pg_regress_ecpg.c | modified | +1 −2 |
| src/test/regress/pg_regress.c | modified | +1 −2 |
Discussion
- Lift line-length limit for pg_service.conf 11 messages · 2020-09-21 → 2020-09-23