From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Rethink API for pg_get_line.c, one more time. |
Date: | 2020-09-22 20:03:41 |
Message-ID: | E1kKoVp-0001Ld-U9@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/931487018c409a3102452f965ccaa48367244a41
Modified Files
--------------
src/bin/initdb/initdb.c | 4 +---
src/common/pg_get_line.c | 29 ++++++++++++++++++++++++++++-
src/include/common/string.h | 1 +
src/interfaces/ecpg/test/pg_regress_ecpg.c | 3 +--
src/test/regress/pg_regress.c | 3 +--
5 files changed, 32 insertions(+), 8 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | noreply | 2020-09-22 21:37:45 | pgsql: Tag refs/tags/REL_13_0 was created |
Previous Message | Tom Lane | 2020-09-22 15:32:16 | pgsql: Exclude fmgrprotos.h from pgindent processing. |