pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: psql: count every COPY FROM STDIN when scanning a query string. 7+ messages / 1 participants [nested] [flat]
* pgsql: psql: count every COPY FROM STDIN when scanning a query string. @ 2026-08-14 16:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-08-14 16:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org psql: count every COPY FROM STDIN when scanning a query string. When SendQuery() is not told how many COPY FROM STDIN commands the query string contains (as for -c, \gexec, and \watch), it scans the string to count them itself. But it called psql_scan() only once, which stops at the first semicolon, so any COPY FROM STDIN past the first sub-command was not counted, causing failure of cases that used to work. Oversight in commit 3045a25ba. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAN4CZFPqa6c+u4uX5jJ8LANHTQ4dxM3m4_8G9WmX_A4-2wuv2A@mail.gmail.com Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bcb776671d9b654ca753e4500faee8e95b61d6b5 Modified Files -------------- src/bin/psql/common.c | 25 +++++++++++++++++++++++-- src/bin/psql/t/001_basic.pl | 30 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: psql: count every COPY FROM STDIN when scanning a query string. @ 2026-08-14 16:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-08-14 16:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org psql: count every COPY FROM STDIN when scanning a query string. When SendQuery() is not told how many COPY FROM STDIN commands the query string contains (as for -c, \gexec, and \watch), it scans the string to count them itself. But it called psql_scan() only once, which stops at the first semicolon, so any COPY FROM STDIN past the first sub-command was not counted, causing failure of cases that used to work. Oversight in commit 3045a25ba. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAN4CZFPqa6c+u4uX5jJ8LANHTQ4dxM3m4_8G9WmX_A4-2wuv2A@mail.gmail.com Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0d7baa209a302bba358bc4f6415a08339dae547f Modified Files -------------- src/bin/psql/common.c | 25 +++++++++++++++++++++++-- src/bin/psql/t/001_basic.pl | 30 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: psql: count every COPY FROM STDIN when scanning a query string. @ 2026-08-14 16:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-08-14 16:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org psql: count every COPY FROM STDIN when scanning a query string. When SendQuery() is not told how many COPY FROM STDIN commands the query string contains (as for -c, \gexec, and \watch), it scans the string to count them itself. But it called psql_scan() only once, which stops at the first semicolon, so any COPY FROM STDIN past the first sub-command was not counted, causing failure of cases that used to work. Oversight in commit 3045a25ba. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAN4CZFPqa6c+u4uX5jJ8LANHTQ4dxM3m4_8G9WmX_A4-2wuv2A@mail.gmail.com Backpatch-through: 14 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7f8de6d877c2440480eb4fcd2fd6a503a373065f Modified Files -------------- src/bin/psql/common.c | 25 +++++++++++++++++++++++-- src/bin/psql/t/001_basic.pl | 30 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: psql: count every COPY FROM STDIN when scanning a query string. @ 2026-08-14 16:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-08-14 16:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org psql: count every COPY FROM STDIN when scanning a query string. When SendQuery() is not told how many COPY FROM STDIN commands the query string contains (as for -c, \gexec, and \watch), it scans the string to count them itself. But it called psql_scan() only once, which stops at the first semicolon, so any COPY FROM STDIN past the first sub-command was not counted, causing failure of cases that used to work. Oversight in commit 3045a25ba. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAN4CZFPqa6c+u4uX5jJ8LANHTQ4dxM3m4_8G9WmX_A4-2wuv2A@mail.gmail.com Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/52f1eaae6c1211d2c7da6f91f6262f7e8afc7a1f Modified Files -------------- src/bin/psql/common.c | 25 +++++++++++++++++++++++-- src/bin/psql/t/001_basic.pl | 30 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: psql: count every COPY FROM STDIN when scanning a query string. @ 2026-08-14 16:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-08-14 16:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org psql: count every COPY FROM STDIN when scanning a query string. When SendQuery() is not told how many COPY FROM STDIN commands the query string contains (as for -c, \gexec, and \watch), it scans the string to count them itself. But it called psql_scan() only once, which stops at the first semicolon, so any COPY FROM STDIN past the first sub-command was not counted, causing failure of cases that used to work. Oversight in commit 3045a25ba. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAN4CZFPqa6c+u4uX5jJ8LANHTQ4dxM3m4_8G9WmX_A4-2wuv2A@mail.gmail.com Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ed0a2b70709ac215f3c669d607f043e570f0cbf5 Modified Files -------------- src/bin/psql/common.c | 25 +++++++++++++++++++++++-- src/bin/psql/t/001_basic.pl | 30 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: psql: count every COPY FROM STDIN when scanning a query string. @ 2026-08-14 16:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-08-14 16:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org psql: count every COPY FROM STDIN when scanning a query string. When SendQuery() is not told how many COPY FROM STDIN commands the query string contains (as for -c, \gexec, and \watch), it scans the string to count them itself. But it called psql_scan() only once, which stops at the first semicolon, so any COPY FROM STDIN past the first sub-command was not counted, causing failure of cases that used to work. Oversight in commit 3045a25ba. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAN4CZFPqa6c+u4uX5jJ8LANHTQ4dxM3m4_8G9WmX_A4-2wuv2A@mail.gmail.com Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f1204c1a798565c24f645503c43135a1372e9d2b Modified Files -------------- src/bin/psql/common.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: psql: count every COPY FROM STDIN when scanning a query string. @ 2026-08-14 16:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2026-08-14 16:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org psql: count every COPY FROM STDIN when scanning a query string. When SendQuery() is not told how many COPY FROM STDIN commands the query string contains (as for -c, \gexec, and \watch), it scans the string to count them itself. But it called psql_scan() only once, which stops at the first semicolon, so any COPY FROM STDIN past the first sub-command was not counted, causing failure of cases that used to work. Oversight in commit 3045a25ba. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAN4CZFPqa6c+u4uX5jJ8LANHTQ4dxM3m4_8G9WmX_A4-2wuv2A@mail.gmail.com Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3828ab7047ba8204c9d71cf606762e9b2c46c024 Modified Files -------------- src/bin/psql/common.c | 25 +++++++++++++++++++++++-- src/bin/psql/t/001_basic.pl | 30 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2026-08-14 16:14 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-08-14 16:14 pgsql: psql: count every COPY FROM STDIN when scanning a query string. Tom Lane <tgl@sss.pgh.pa.us> 2026-08-14 16:14 pgsql: psql: count every COPY FROM STDIN when scanning a query string. Tom Lane <tgl@sss.pgh.pa.us> 2026-08-14 16:14 pgsql: psql: count every COPY FROM STDIN when scanning a query string. Tom Lane <tgl@sss.pgh.pa.us> 2026-08-14 16:14 pgsql: psql: count every COPY FROM STDIN when scanning a query string. Tom Lane <tgl@sss.pgh.pa.us> 2026-08-14 16:14 pgsql: psql: count every COPY FROM STDIN when scanning a query string. Tom Lane <tgl@sss.pgh.pa.us> 2026-08-14 16:14 pgsql: psql: count every COPY FROM STDIN when scanning a query string. Tom Lane <tgl@sss.pgh.pa.us> 2026-08-14 16:14 pgsql: psql: count every COPY FROM STDIN when scanning a query string. 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