pgsql: Disallow calling anything but plain functions via the fastpath A

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Disallow calling anything but plain functions via the fastpath A
Дата
Msg-id E1lcXbF-0008Bz-N5@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Disallow calling anything but plain functions via the fastpath API.

Reject aggregates, window functions, and procedures.  Aggregates
failed anyway, though with a somewhat obscure error message.
Window functions would hit an Assert or null-pointer dereference.
Procedures seemed to work as long as you didn't try to do
transaction control, but (a) transaction control is sort of the
point of a procedure, and (b) it's not entirely clear that no
bugs lurk in that path.  Given the lack of testing of this area,
it seems safest to be conservative in what we support.

Also reject proretset functions, as the fastpath protocol can't
support returning a set.

Also remove an easily-triggered assertion that the given OID
isn't 0; the subsequent lookups can handle that case themselves.

Per report from Theodor-Arsenij Larionov-Trichkin.
Back-patch to all supported branches.  (The procedure angle
only applies in v11+, of course.)

Discussion: https://postgr.es/m/2039442.1615317309@sss.pgh.pa.us

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/backend/tcop/fastpath.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: pgsql: Fix the bugs in selecting the transaction for streaming.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: update libpq's documentation for PQfn().