Re: Make EXPLAIN generate a generic plan for a parameterized query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Michel Pelletier <pelletier(dot)michel(at)gmail(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Make EXPLAIN generate a generic plan for a parameterized query
Date: 2023-02-03 14:44:43
Message-ID: 1689348.1675435483@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> I played around with it, and I ran into a problem with partitions that
> are foreign tables:
> ...
> EXPLAIN (GENERIC_PLAN) SELECT * FROM looppart WHERE key = $1;
> ERROR: no value found for parameter 1

Hmm, offhand I'd say that something is doing something it has no
business doing when EXEC_FLAG_EXPLAIN_ONLY is set (that is, premature
evaluation of an expression). I wonder whether this failure is
reachable without this patch.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2023-02-03 14:56:06 proposal: psql: show current user in prompt
Previous Message Justin Pryzby 2023-02-03 14:26:57 Re: CI and test improvements