Lift line-length limit for pg_service.conf

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-21T11:56:00Z
Lists: pgsql-hackers

Attachments

The pg_service.conf parsing thread [0] made me realize that we have a hardwired
line length of max 256 bytes.  Lifting this would be in line with recent work
for ecpg, pg_regress and pg_hba (784b1ba1a2 and 8f8154a50).  The attached moves
pg_service.conf to use the new pg_get_line_append API and a StringInfo to lift
the restriction. Any reason not to do that while we're lifting other such limits?

cheers ./daniel

Commits

  1. Improve behavior of tsearch_readline(), and remove t_readline().

  2. Avoid possible dangling-pointer access in tsearch_readline_callback.

  3. Simplify SortTocFromFile() by removing fixed buffer-size limit.

  4. Remove arbitrary line length limit for libpq service files.

  5. Rethink API for pg_get_line.c, one more time.