On Thu, Mar 20, 2025 at 8:37 PM Sami Imseih <samims...@gmail.com> wrote: > 1/ provides a good example for future extensions on how to > use the new hooks. it definitely would be nice to add an example > for the hook added to check options against each other as mentioned > by Andrei here [0] but I could not find a good reason to do so with > pg_overexplain.
Yeah, there may be a good idea lurking somewhere here but I have not yet come up with it. > 2/ I agree that this is better than debug_print_plan to avoid all the > verbosity of that output emitting at once. But maybe it will be useful > to provide options to show other parts like the target list, quals, etc. > I wonder if something like this will be better? > > explain (query_tree_show range_table) select .. > explain (query_tree_show qualification) select .. > explain (query_tree_show target_list) select .. But why would those options be exclusive of each other? Surely you could want more than one of those things, which suggests that separate options are better. Also, the reason I didn't do the quals or the target list is because regular EXPLAIN already shows that stuff. There could possibly be some value in trying to show things about those node trees that regular EXPLAIN doesn't, but that quickly gets into (a) speculation about what people actually want to see and/or (b) extremely voluminous output which is the whole reason debug_print_plan is hard to use in the first place. > 1/ trailing whitespace > 2/ typos Acknowledged, thanks. -- Robert Haas EDB: http://www.enterprisedb.com