pgsql: Rethink API for pg_get_line.c, one more time.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Rethink API for pg_get_line.c, one more time.
Дата
Msg-id E1kKoVp-0001Ld-U9@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Exclude fmgrprotos.h from pgindent processing.
Следующее
От: noreply@postgresql.org
Дата:
Сообщение: pgsql: Tag refs/tags/REL_13_0 was created