Re: add a new explain option including_query for include query string inside the json plan output
От | Matthias van de Meent |
---|---|
Тема | Re: add a new explain option including_query for include query string inside the json plan output |
Дата | |
Msg-id | CAEze2WgJ9kqD2Kj2+=VcyJqqNrpNta2aUEu=MpqjjO4sKEey3Q@mail.gmail.com обсуждение исходный текст |
Ответ на | add a new explain option including_query for include query string inside the json plan output (jian he <jian.universality@gmail.com>) |
Ответы |
Re: add a new explain option including_query for include query string inside the json plan output
|
Список | pgsql-hackers |
On Tue, 25 Jun 2024 at 10:55, jian he <jian.universality@gmail.com> wrote: > > for json format, add a new option to let the explain json output also > include the actual query string. How would this cooperate with e.g. EXPLAIN (...) EXECUTE my_prepared_statement? Would this query be the prepared statement's query, or the top-level EXECUTE statement? > it can make json usage more convenient. > Now you only need to grab the json output, no need to > collect another explain statement and extract the actual query from > the explain statement. Wouldn't the user be able to keep track of the query they wanted explained by themselves? If not, why? > example: > explain (analyze,including_query on, format json) select 1; > QUERY PLAN > ------------------------------------- > [ + > {"Query": "select 1"}, + > { + > "Plan": { + If we were to add the query to the explain output, I think it should be a top-level key in the same JSON object that holds the "Plan", Triggers, and "Execution Time" keys. Kind regards, Matthias van de Meent Neon (https://neon.tech)
В списке pgsql-hackers по дате отправления: