Re: making EXPLAIN extensible

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Thom Brown <thom(at)linux(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: making EXPLAIN extensible
Date: 2025-03-13 21:51:52
Message-ID: CAA5RZ0uky7T78K4+-+3jMLrtfF2Oh7_Km6-XEoCc6E4M4Bpe6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> The validation point is an interesting one. I agree that we don't
> want the behavior to depend on the order in which options are
> written.

Here is what I applied on top of v6-0001 to correct this issue. Attaching it
as a text file only as Robert may have a different opinion on how to fix
this.

I felt the best way is to create another handler for registering a validation
function. This means we have to loop through the options list twice,
but I don't think that is a problem.

postgres=# explain (remote_plans, analyze) select * from t_r1;
ERROR: EXPLAIN options REMOTE_PLANS and ANALYZE cannot be used together
postgres=# explain (analyze, remote_plans) select * from t_r1;
ERROR: EXPLAIN options REMOTE_PLANS and ANALYZE cannot be used together

Regards,

Sami

Attachment Content-Type Size
0001-Add-a-handler-to-validate-an-EXPLAIN-option-defined-.txt text/plain 3.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-03-13 21:52:08 Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET
Previous Message Melanie Plageman 2025-03-13 21:41:14 Re: BitmapHeapScan streaming read user and prelim refactoring