pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func 6+ messages / 1 participants [nested] [flat]
* pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func @ 2017-01-14 18:28 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-14 18:28 UTC (permalink / raw) To: pgsql-committers Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL function. A client copy can't work inside a function because the FE/BE wire protocol doesn't support nesting of a COPY operation within query results. (Maybe it could, but the protocol spec doesn't suggest that clients should support this, and libpq for one certainly doesn't.) In most PLs, this prohibition is enforced by spi.c, but SQL functions don't use SPI. A comparison of _SPI_execute_plan() and init_execution_state() shows that rejecting client COPY is the only discrepancy in what they allow, so there's no other similar bugs. This is an astonishingly ancient oversight, so back-patch to all supported branches. Report: https://postgr.es/m/BY2PR05MB2309EABA3DEFA0143F50F0D593780@BY2PR05MB2309.namprd05.prod.outlook.com Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/75abb955dfef064f2fbc5c043f37fff8d0262ffe Modified Files -------------- src/backend/executor/functions.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func @ 2017-01-14 18:28 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-14 18:28 UTC (permalink / raw) To: pgsql-committers Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL function. A client copy can't work inside a function because the FE/BE wire protocol doesn't support nesting of a COPY operation within query results. (Maybe it could, but the protocol spec doesn't suggest that clients should support this, and libpq for one certainly doesn't.) In most PLs, this prohibition is enforced by spi.c, but SQL functions don't use SPI. A comparison of _SPI_execute_plan() and init_execution_state() shows that rejecting client COPY is the only discrepancy in what they allow, so there's no other similar bugs. This is an astonishingly ancient oversight, so back-patch to all supported branches. Report: https://postgr.es/m/BY2PR05MB2309EABA3DEFA0143F50F0D593780@BY2PR05MB2309.namprd05.prod.outlook.com Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/8a70d8ae7501141d283e56b31e10c66697c986d5 Modified Files -------------- src/backend/executor/functions.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func @ 2017-01-14 18:28 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-14 18:28 UTC (permalink / raw) To: pgsql-committers Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL function. A client copy can't work inside a function because the FE/BE wire protocol doesn't support nesting of a COPY operation within query results. (Maybe it could, but the protocol spec doesn't suggest that clients should support this, and libpq for one certainly doesn't.) In most PLs, this prohibition is enforced by spi.c, but SQL functions don't use SPI. A comparison of _SPI_execute_plan() and init_execution_state() shows that rejecting client COPY is the only discrepancy in what they allow, so there's no other similar bugs. This is an astonishingly ancient oversight, so back-patch to all supported branches. Report: https://postgr.es/m/BY2PR05MB2309EABA3DEFA0143F50F0D593780@BY2PR05MB2309.namprd05.prod.outlook.com Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/a23ea8f65e07aa56a501bbdd68068b52469d77cf Modified Files -------------- src/backend/executor/functions.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func @ 2017-01-14 18:28 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-14 18:28 UTC (permalink / raw) To: pgsql-committers Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL function. A client copy can't work inside a function because the FE/BE wire protocol doesn't support nesting of a COPY operation within query results. (Maybe it could, but the protocol spec doesn't suggest that clients should support this, and libpq for one certainly doesn't.) In most PLs, this prohibition is enforced by spi.c, but SQL functions don't use SPI. A comparison of _SPI_execute_plan() and init_execution_state() shows that rejecting client COPY is the only discrepancy in what they allow, so there's no other similar bugs. This is an astonishingly ancient oversight, so back-patch to all supported branches. Report: https://postgr.es/m/BY2PR05MB2309EABA3DEFA0143F50F0D593780@BY2PR05MB2309.namprd05.prod.outlook.com Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/c3775577878fc89b7b5ccb3f222cd8a01425ccb6 Modified Files -------------- src/backend/executor/functions.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func @ 2017-01-14 18:28 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-14 18:28 UTC (permalink / raw) To: pgsql-committers Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL function. A client copy can't work inside a function because the FE/BE wire protocol doesn't support nesting of a COPY operation within query results. (Maybe it could, but the protocol spec doesn't suggest that clients should support this, and libpq for one certainly doesn't.) In most PLs, this prohibition is enforced by spi.c, but SQL functions don't use SPI. A comparison of _SPI_execute_plan() and init_execution_state() shows that rejecting client COPY is the only discrepancy in what they allow, so there's no other similar bugs. This is an astonishingly ancient oversight, so back-patch to all supported branches. Report: https://postgr.es/m/BY2PR05MB2309EABA3DEFA0143F50F0D593780@BY2PR05MB2309.namprd05.prod.outlook.com Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/47d32a464a8a5e70c95fe52d6b3e3a3fb25fd845 Modified Files -------------- src/backend/executor/functions.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func @ 2017-01-14 18:28 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-14 18:28 UTC (permalink / raw) To: pgsql-committers Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL function. A client copy can't work inside a function because the FE/BE wire protocol doesn't support nesting of a COPY operation within query results. (Maybe it could, but the protocol spec doesn't suggest that clients should support this, and libpq for one certainly doesn't.) In most PLs, this prohibition is enforced by spi.c, but SQL functions don't use SPI. A comparison of _SPI_execute_plan() and init_execution_state() shows that rejecting client COPY is the only discrepancy in what they allow, so there's no other similar bugs. This is an astonishingly ancient oversight, so back-patch to all supported branches. Report: https://postgr.es/m/BY2PR05MB2309EABA3DEFA0143F50F0D593780@BY2PR05MB2309.namprd05.prod.outlook.com Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/5e1e2e75d25b7fd7152fa2b41998efd2dac9c275 Modified Files -------------- src/backend/executor/functions.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2017-01-14 18:28 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-01-14 18:28 pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func Tom Lane <tgl@sss.pgh.pa.us> 2017-01-14 18:28 pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func Tom Lane <tgl@sss.pgh.pa.us> 2017-01-14 18:28 pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func Tom Lane <tgl@sss.pgh.pa.us> 2017-01-14 18:28 pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func Tom Lane <tgl@sss.pgh.pa.us> 2017-01-14 18:28 pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func Tom Lane <tgl@sss.pgh.pa.us> 2017-01-14 18:28 pgsql: Throw suitable error for COPY TO STDOUT/FROM STDIN in a SQL func 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