pgsql: Remove arbitrary line length limits in pg_regress (plain and ECP

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Remove arbitrary line length limits in pg_regress (plain and ECP
Дата
Msg-id E1kEzAk-0002ho-DX@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Remove arbitrary line length limits in pg_regress (plain and ECPG).

Refactor replace_string() to use a StringInfo for the modifiable
string argument.  This allows the string to be of indefinite size
initially and/or grow substantially during replacement.  The previous
logic in convert_sourcefiles_in() had a hard-wired limit of 1024
bytes on any line in input/*.sql or output/*.out files.  While we've
not had reports of trouble yet, it'd surely have bit us someday.

This also fixes replace_string() so it won't get into an infinite
loop if the string-to-be-replaced is a substring of the replacement.
That's unlikely to happen in current usage, but the function surely
shouldn't depend on it.

Also fix ecpg_filter() to use a StringInfo and thereby remove its
hard limit of 300 bytes on the length of an ecpg source line.

Asim Rama Praveen and Georgios Kokolatos,
reviewed by Alvaro Herrera and myself

Discussion:
https://postgr.es/m/y9Dlk2QhiZ39DhaB1QE9mgZ95HcOQKZCNtGwN7XCRKMdBRBnX_0woaRUtTjloEp4PKA6ERmcUcfq3lPGfKPOJ5xX2TV-5WoRYyySeNHRzdw=@protonmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/784b1ba1a2b9306697544bedb2ef9425185dd206

Modified Files
--------------
src/interfaces/ecpg/test/pg_regress_ecpg.c | 76 +++++++++++++++---------------
src/test/regress/pg_regress.c              | 52 +++++++++++++-------
src/test/regress/pg_regress.h              |  5 +-
3 files changed, 77 insertions(+), 56 deletions(-)


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: pgsql: Change path in example of file_fdw for logs
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Apply auto-vectorization to the inner loop of numeric multiplica