Re: PL/pgSQL: fix validation of anycompatiblemultirange

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PL/pgSQL: fix validation of anycompatiblemultirange
Date: 2026-10-26 18:05:07
Message-ID: 736326.1793037907@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com> writes:
> When validating a PL/pgSQL function with polymorphic arguments or result
> type,
> we substitute a plausible concrete type for each polymorphic type. This is
> done in two places, cfunc_resolve_polymorphic_argtypes() in funccache.c for
> arguments and plpgsql_compile_callback() in pl_comp.c for the result type.
> Both handle anycompatiblerange and anymultirange, but neither handles
> anycompatiblemultirange. This appears to have been missed when multiranges
> were added in 6df7a9698bb (v14), which added the anymultirange case to both
> places but did not add any PL/pgSQL test for anycompatiblemultirange.

Good catch, fix pushed. I didn't bother with the test cases though,
as they seem too specific to help us catch any future problems.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-10-26 18:08:29 Re: WAL record CRC calculated incorrectly because of underlying buffer modification
Previous Message Greg Burd 2026-10-26 18:02:36 Re: Let's drop support for named POSIX semaphores