Re: Procedures versus the "fastpath" API
Joe Conway <mail@joeconway.com>
From: Joe Conway <mail@joeconway.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2021-03-09T19:33:47Z
Lists: pgsql-hackers
On 3/9/21 2:15 PM, Tom Lane wrote: > So the question on the table is what to do about this. As far as > window functions go, it seems clear that fastpath.c should just reject > any attempt to call a window function that way (or an aggregate for > that matter; aggregates fail already, but with relatively obscure > error messages). Perhaps there's also an argument that window > functions should have run-time tests, not just assertions, that > they're called in a valid way. > > As for procedures, I'm of the opinion that we should just reject those > too, but some other security team members were not happy with that > idea. Conceivably we could attempt to make the case actually work, > but is it worth the trouble? Given the lack of field complaints > about the "invalid transaction termination" failure, it seems unlikely > that it's occurred to anyone to try to call procedures this way. > We'd need special infrastructure to test the case, too, since psql > offers no access to fastpath calls. +1 > A compromise suggestion was to prohibit calling procedures via > fastpath as of HEAD, but leave existing releases as they are, > in case anyone is using a case that happens to work. > > Thoughts? My vote would be reject using fastpath for procedures in all relevant branches. If someday someone cares enough to make it work, it is a new feature for a new major release. Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
Commits
-
Doc: update libpq's documentation for PQfn().
- d25997f898dd 11.12 landed
- 8e9b7c638770 12.7 landed
- 7c810bd028a7 13.3 landed
- 49172d88f9d0 10.17 landed
- 386e64ea5abf 14.0 landed
- 2033d108ee6b 9.6.22 landed
-
Disallow calling anything but plain functions via the fastpath API.
- ebc2ff076ef2 11.12 landed
- 89768ee696bf 12.7 landed
- 73bad52a93d6 9.6.22 landed
- 4d225ba0e6da 13.3 landed
- 2efcd502e56a 14.0 landed
- 0627f3630ce7 10.17 landed