Greetings,

* Tom Lane (t...@sss.pgh.pa.us) wrote:
> Andres Freund <and...@anarazel.de> writes:
> > As I said, I don't think ALL is a good idea under any name.  Like it
> > just makes no sense to have ANALYZE, SUMMARY, VERBOSE, BUFFERS,
> > SETTINGS, FORMAT controlled by one option, unless you call it DWIM. It's
> > several separate axis (query is executed or not (ANALYZE), verbosity
> > (SUMMARY, VERBOSE), collecting additional information (BUFFERS, TIMING),
> > output format).
> 
> FWIW, I find this line of argument fairly convincing.  There may well
> be a case for rethinking just how EXPLAIN's options behave, but "ALL"
> doesn't seem like a good conceptual model.
> 
> One idea that comes to mind is that VERBOSE could be redefined as some
> sort of package of primitive options, including all of the "additional
> information" options, with the ability to turn individual ones off again
> if you wanted.  So for example (VERBOSE, BUFFERS OFF) would give you
> everything except buffer stats.  We'd need a separate flag/flags to
> control what VERBOSE originally did, but that doesn't bother me ---
> it's an opportunity for more clarity of definition, anyway.

I'm generally in favor of doing something like what Tom is suggesting
with VERBOSE, but I also feel like it should be the default for formats
like JSON.  If you're asking for the output in JSON, then we really
should include everything that a flag like VERBOSE would contain because
you're pretty clearly planning to copy/paste that output into something
else to read it anyway.

> I do feel that it's a good idea to keep ANALYZE separate. "Execute
> the query or not" is a mighty fundamental thing.  I've never liked
> that name for the option though --- maybe we could deprecate it
> in favor of EXECUTE?

Let's not fool ourselves by saying we'd 'deprecate' it because that
implies, at least to me, that there's some intention of later on
removing it and people will potentially propose patches to do that,
which we will then almost certainly spend hours arguing about with the
result being that we don't actually remove it.

I'm all in favor of adding an alias for analyze called 'execute', as
that makes a lot more sense and then updating our documentation to use
it, with 'analyze is accepted as an alias' as a footnote.

Thanks,

Stephen

Attachment: signature.asc
Description: PGP signature

Reply via email to