From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove arbitrary line length limits in pg_regress (plain and ECP |
Date: | 2020-09-06 18:13:50 |
Message-ID: | E1kEzAk-0002ho-DX@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-09-07 01:40:54 | pgsql: Split Makefile symbol CFLAGS_VECTOR into two symbols. |
Previous Message | Magnus Hagander | 2020-09-06 17:31:11 | pgsql: Change path in example of file_fdw for logs |