Re: BUG #19073: there are meaningless code in _SPI_execute_plan() when canSetTag is true

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #19073: there are meaningless code in _SPI_execute_plan() when canSetTag is true
Дата
Msg-id 1680816.1759679313@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #19073: there are meaningless code in _SPI_execute_plan() when canSetTag is true  ("Euler Taveira" <euler@eulerto.com>)
Список pgsql-bugs
"Euler Taveira" <euler@eulerto.com> writes:
> On Sat, Oct 4, 2025, at 11:29 PM, PG Bug reporting form wrote:
>> If plan is canSetTag subqueries, `SPI_freetuptable(my_tuptable)` is
>> meaningless, because `my_tuptable` is NULL.

> There could be multiple statements. The first case will call SPI_freetuptable()
> and it is a noop. The code path you are referring to is inside a foreach loop
> and a previous statement might set my_tuptable and needs to be freed before
> reusing it. That's exactly what the comment says.

Yeah.  You'd only reach this case if there were multiple SQL
statements in the string given to SPI_execute() or similar,
but that's perfectly legal.

            regards, tom lane



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