Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lowell Hought <lowell(dot)hought(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17
Date: 2025-06-08 02:07:59
Message-ID: 81946.1749348479@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Lowell Hought <lowell(dot)hought(at)gmail(dot)com> writes:
> If I run the query outside of the function it works as expected. But the function never returns.

This isn't that surprising either: a query inside a function is
often translated into a "generic" plan that doesn't depend on
specific parameter values, typically sacrificing runtime to
avoid repeated planning. Does it get any better if you do
"set plan_cache_mode = force_custom_plan" before running the
function?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2025-06-08 02:19:29 Re: BUG #18943: Return value of a function 'xmlBufferCreate' is dereferenced at xpath.c:177 without checking for NUL
Previous Message Lowell Hought 2025-06-08 01:40:32 Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17