I'm not sure what the best way is though. I don't think continuing to
add keywords between EXPLAIN and the start of the query is very
scalable. Putting parentheses around the option list seems like it
might eliminate a lot of grammar headaches:
Do you think it is required to invent special grammar just for presentation purposes?
I guess database should not deal with presentation. Provided "explain" retuns table, it is up to the client to do the formatting. I do not believe it makes sense creating several different explain outputs, and redo all the work in 8.5.
It still could make sense having several options for "explain" if that would result in different instrumentation (e.g. "explain" vs "explain analyze").
Regards,
Vladimir Sitnikov