pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Parse libpq's "keepalives" option more like other integer option 7+ messages / 1 participants [nested] [flat]
* pgsql: Parse libpq's "keepalives" option more like other integer option @ 2024-10-02 21:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-10-02 21:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Parse libpq's "keepalives" option more like other integer options. Use pqParseIntParam (nee parse_int_param) instead of using strtol directly. This allows trailing whitespace, which the previous coding didn't, and makes the spelling of the error message consistent with other similar cases. This seems to be an oversight in commit e7a221797, which introduced parse_int_param. That fixed places that were using atoi(), but missed this place which was randomly using strtol() instead. Ordinarily I'd consider this minor cleanup not worth back-patching. However, it seems that ecpg assumes it can add trailing whitespace to URL parameters, so that use of the keepalives option fails in that context. Perhaps that's worth improving as a separate matter. In the meantime, back-patch this to all supported branches. Yuto Sasaki (some further cleanup by me) Discussion: https://postgr.es/m/TY2PR01MB36286A7B97B9A15793335D18C1772@TY2PR01MB3628.jpnprd01.prod.outlook.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/920d51979a99df29112396b2c75da7921ba7a7b0 Modified Files -------------- src/interfaces/libpq/fe-connect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Parse libpq's "keepalives" option more like other integer option @ 2024-10-02 21:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-10-02 21:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Parse libpq's "keepalives" option more like other integer options. Use pqParseIntParam (nee parse_int_param) instead of using strtol directly. This allows trailing whitespace, which the previous coding didn't, and makes the spelling of the error message consistent with other similar cases. This seems to be an oversight in commit e7a221797, which introduced parse_int_param. That fixed places that were using atoi(), but missed this place which was randomly using strtol() instead. Ordinarily I'd consider this minor cleanup not worth back-patching. However, it seems that ecpg assumes it can add trailing whitespace to URL parameters, so that use of the keepalives option fails in that context. Perhaps that's worth improving as a separate matter. In the meantime, back-patch this to all supported branches. Yuto Sasaki (some further cleanup by me) Discussion: https://postgr.es/m/TY2PR01MB36286A7B97B9A15793335D18C1772@TY2PR01MB3628.jpnprd01.prod.outlook.com Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c7a201053e3f7d322782e57879b43d1fd8b7bf32 Modified Files -------------- src/interfaces/libpq/fe-connect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Parse libpq's "keepalives" option more like other integer option @ 2024-10-02 21:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-10-02 21:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Parse libpq's "keepalives" option more like other integer options. Use pqParseIntParam (nee parse_int_param) instead of using strtol directly. This allows trailing whitespace, which the previous coding didn't, and makes the spelling of the error message consistent with other similar cases. This seems to be an oversight in commit e7a221797, which introduced parse_int_param. That fixed places that were using atoi(), but missed this place which was randomly using strtol() instead. Ordinarily I'd consider this minor cleanup not worth back-patching. However, it seems that ecpg assumes it can add trailing whitespace to URL parameters, so that use of the keepalives option fails in that context. Perhaps that's worth improving as a separate matter. In the meantime, back-patch this to all supported branches. Yuto Sasaki (some further cleanup by me) Discussion: https://postgr.es/m/TY2PR01MB36286A7B97B9A15793335D18C1772@TY2PR01MB3628.jpnprd01.prod.outlook.com Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/65f431affda822b3734f04d31c46107e15bc2d34 Modified Files -------------- src/interfaces/libpq/fe-connect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Parse libpq's "keepalives" option more like other integer option @ 2024-10-02 21:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-10-02 21:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Parse libpq's "keepalives" option more like other integer options. Use pqParseIntParam (nee parse_int_param) instead of using strtol directly. This allows trailing whitespace, which the previous coding didn't, and makes the spelling of the error message consistent with other similar cases. This seems to be an oversight in commit e7a221797, which introduced parse_int_param. That fixed places that were using atoi(), but missed this place which was randomly using strtol() instead. Ordinarily I'd consider this minor cleanup not worth back-patching. However, it seems that ecpg assumes it can add trailing whitespace to URL parameters, so that use of the keepalives option fails in that context. Perhaps that's worth improving as a separate matter. In the meantime, back-patch this to all supported branches. Yuto Sasaki (some further cleanup by me) Discussion: https://postgr.es/m/TY2PR01MB36286A7B97B9A15793335D18C1772@TY2PR01MB3628.jpnprd01.prod.outlook.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bb8c89dbcde713b56b644cb42519db884d59ed91 Modified Files -------------- src/interfaces/libpq/fe-connect.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Parse libpq's "keepalives" option more like other integer option @ 2024-10-02 21:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-10-02 21:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Parse libpq's "keepalives" option more like other integer options. Use pqParseIntParam (nee parse_int_param) instead of using strtol directly. This allows trailing whitespace, which the previous coding didn't, and makes the spelling of the error message consistent with other similar cases. This seems to be an oversight in commit e7a221797, which introduced parse_int_param. That fixed places that were using atoi(), but missed this place which was randomly using strtol() instead. Ordinarily I'd consider this minor cleanup not worth back-patching. However, it seems that ecpg assumes it can add trailing whitespace to URL parameters, so that use of the keepalives option fails in that context. Perhaps that's worth improving as a separate matter. In the meantime, back-patch this to all supported branches. Yuto Sasaki (some further cleanup by me) Discussion: https://postgr.es/m/TY2PR01MB36286A7B97B9A15793335D18C1772@TY2PR01MB3628.jpnprd01.prod.outlook.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e7af9b52f67998f72f3d57f506e235f3cda151cb Modified Files -------------- src/interfaces/libpq/fe-connect.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Parse libpq's "keepalives" option more like other integer option @ 2024-10-02 21:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-10-02 21:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Parse libpq's "keepalives" option more like other integer options. Use pqParseIntParam (nee parse_int_param) instead of using strtol directly. This allows trailing whitespace, which the previous coding didn't, and makes the spelling of the error message consistent with other similar cases. This seems to be an oversight in commit e7a221797, which introduced parse_int_param. That fixed places that were using atoi(), but missed this place which was randomly using strtol() instead. Ordinarily I'd consider this minor cleanup not worth back-patching. However, it seems that ecpg assumes it can add trailing whitespace to URL parameters, so that use of the keepalives option fails in that context. Perhaps that's worth improving as a separate matter. In the meantime, back-patch this to all supported branches. Yuto Sasaki (some further cleanup by me) Discussion: https://postgr.es/m/TY2PR01MB36286A7B97B9A15793335D18C1772@TY2PR01MB3628.jpnprd01.prod.outlook.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2120eda94420416abb0ce57a65ea33bc72fdf55f Modified Files -------------- src/interfaces/libpq/fe-connect.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Parse libpq's "keepalives" option more like other integer option @ 2024-10-02 21:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2024-10-02 21:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Parse libpq's "keepalives" option more like other integer options. Use pqParseIntParam (nee parse_int_param) instead of using strtol directly. This allows trailing whitespace, which the previous coding didn't, and makes the spelling of the error message consistent with other similar cases. This seems to be an oversight in commit e7a221797, which introduced parse_int_param. That fixed places that were using atoi(), but missed this place which was randomly using strtol() instead. Ordinarily I'd consider this minor cleanup not worth back-patching. However, it seems that ecpg assumes it can add trailing whitespace to URL parameters, so that use of the keepalives option fails in that context. Perhaps that's worth improving as a separate matter. In the meantime, back-patch this to all supported branches. Yuto Sasaki (some further cleanup by me) Discussion: https://postgr.es/m/TY2PR01MB36286A7B97B9A15793335D18C1772@TY2PR01MB3628.jpnprd01.prod.outlook.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/47d8a15deaebc755daf0289993e5898a3536a107 Modified Files -------------- src/interfaces/libpq/fe-connect.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2024-10-02 21:30 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-10-02 21:30 pgsql: Parse libpq's "keepalives" option more like other integer option Tom Lane <tgl@sss.pgh.pa.us> 2024-10-02 21:30 pgsql: Parse libpq's "keepalives" option more like other integer option Tom Lane <tgl@sss.pgh.pa.us> 2024-10-02 21:30 pgsql: Parse libpq's "keepalives" option more like other integer option Tom Lane <tgl@sss.pgh.pa.us> 2024-10-02 21:30 pgsql: Parse libpq's "keepalives" option more like other integer option Tom Lane <tgl@sss.pgh.pa.us> 2024-10-02 21:30 pgsql: Parse libpq's "keepalives" option more like other integer option Tom Lane <tgl@sss.pgh.pa.us> 2024-10-02 21:30 pgsql: Parse libpq's "keepalives" option more like other integer option Tom Lane <tgl@sss.pgh.pa.us> 2024-10-02 21:30 pgsql: Parse libpq's "keepalives" option more like other integer option 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