pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove arbitrary line length limits in pg_regress (plain and ECP
2+ messages / 1 participants
[nested] [flat]

* pgsql: Remove arbitrary line length limits in pg_regress (plain and ECP
@ 2020-09-06 18:13 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-09-06 18:13 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_0woaRUtTjloEp4PKA6ERmcUcfq3lPG...

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Remove arbitrary line length limit for libpq service files.
@ 2020-09-22 20:03 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-09-22 20:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove arbitrary line length limit for libpq service files.

Use a StringInfo instead of a fixed-size buffer in parseServiceInfo().
While we've not heard complaints about the existing 255-byte limit,
it certainly seems possible that complex cases could run afoul of it.

Daniel Gustafsson

Discussion: https://postgr.es/m/48A4FA71-524E-41B9-953A-FD04EF36E2E7@yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c0cb87fbb6642222a99593785f77d318af06ef02

Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 68 ++++++++++++++++++---------------------
1 file changed, 31 insertions(+), 37 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-09-22 20:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06 18:13 pgsql: Remove arbitrary line length limits in pg_regress (plain and ECP Tom Lane <tgl@sss.pgh.pa.us>
2020-09-22 20:03 pgsql: Remove arbitrary line length limit for libpq service files. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox