public inbox for [email protected]
help / color / mirror / Atom feed[PATCH 6/6] 0003 review
4+ messages / 4 participants
[nested] [flat]
* [PATCH 6/6] 0003 review
@ 2021-02-15 15:36 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Tomas Vondra @ 2021-02-15 15:36 UTC (permalink / raw)
---
src/test/regress/input/copy.source | 4 ++--
src/test/regress/output/copy.source | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/test/regress/input/copy.source b/src/test/regress/input/copy.source
index ddde33e7cc..4ee1b26326 100644
--- a/src/test/regress/input/copy.source
+++ b/src/test/regress/input/copy.source
@@ -204,7 +204,7 @@ drop table parted_copytest;
--
-- progress reporting
---
+--
-- setup
-- reuse employer datatype, that has a small sized data set
@@ -221,7 +221,7 @@ create function notice_after_progress_reporting() returns trigger AS
$$
declare report record;
begin
- -- We cannot expect 'pid' nor 'relid' to be consistent over runs due to
+ -- We cannot expect 'pid' nor 'relid' to be consistent over runs due to
-- variance in system process ids, and concurrency in runs of tests.
-- Additionally, due to the usage of this test in pg_regress, the 'datid'
-- also is not consistent between runs.
diff --git a/src/test/regress/output/copy.source b/src/test/regress/output/copy.source
index 60f4206aa1..8ebfb7ae81 100644
--- a/src/test/regress/output/copy.source
+++ b/src/test/regress/output/copy.source
@@ -167,7 +167,7 @@ select * from parted_copytest where b = 2;
drop table parted_copytest;
--
-- progress reporting
---
+--
-- setup
-- reuse employer datatype, that has a small sized data set
create table progress_reporting (
@@ -181,7 +181,7 @@ create function notice_after_progress_reporting() returns trigger AS
$$
declare report record;
begin
- -- We cannot expect 'pid' nor 'relid' to be consistent over runs due to
+ -- We cannot expect 'pid' nor 'relid' to be consistent over runs due to
-- variance in system process ids, and concurrency in runs of tests.
-- Additionally, due to the usage of this test in pg_regress, the 'datid'
-- also is not consistent between runs.
--
2.26.2
--------------DA8D60BF026F7ACE69A9AEE5--
^ permalink raw reply [nested|flat] 4+ messages in thread
* add a new explain option including_query for include query string inside the json plan output
@ 2024-06-25 08:54 jian he <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: jian he @ 2024-06-25 08:54 UTC (permalink / raw)
To: PostgreSQL Hackers <[email protected]>
for json format, add a new option to let the explain json output also
include the actual query string.
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.
including_query name is so far what i can come up with, if people have
better ideas, then we can change.
example:
explain (analyze,including_query on, format json) select 1;
QUERY PLAN
-------------------------------------
[ +
{"Query": "select 1"}, +
{ +
"Plan": { +
"Node Type": "Result", +
"Parallel Aware": false, +
"Async Capable": false, +
"Startup Cost": 0.00, +
"Total Cost": 0.01, +
"Plan Rows": 1, +
"Plan Width": 4, +
"Actual Startup Time": 0.001,+
"Actual Total Time": 0.001, +
"Actual Rows": 1, +
"Actual Loops": 1 +
}, +
"Planning Time": 0.119, +
"Triggers": [ +
], +
"Execution Time": 0.033 +
} +
]
(1 row)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: add a new explain option including_query for include query string inside the json plan output
@ 2024-06-25 10:30 Matthias van de Meent <[email protected]>
parent: jian he <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Matthias van de Meent @ 2024-06-25 10:30 UTC (permalink / raw)
To: jian he <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>
On Tue, 25 Jun 2024 at 10:55, jian he <[email protected]> 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)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: add a new explain option including_query for include query string inside the json plan output
@ 2024-06-25 14:23 Tom Lane <[email protected]>
parent: Matthias van de Meent <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2024-06-25 14:23 UTC (permalink / raw)
To: Matthias van de Meent <[email protected]>; +Cc: jian he <[email protected]>; PostgreSQL Hackers <[email protected]>
Matthias van de Meent <[email protected]> writes:
> On Tue, 25 Jun 2024 at 10:55, jian he <[email protected]> wrote:
>> for json format, add a new option to let the explain json output also
>> include the actual query string.
> Wouldn't the user be able to keep track of the query they wanted
> explained by themselves? If not, why?
Indeed. I do not think this is a good idea at all, even if the
question of "where did you get the query string from" could be
resolved satisfactorily.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-06-25 14:23 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 15:36 [PATCH 6/6] 0003 review Tomas Vondra <[email protected]>
2024-06-25 08:54 add a new explain option including_query for include query string inside the json plan output jian he <[email protected]>
2024-06-25 10:30 ` Re: add a new explain option including_query for include query string inside the json plan output Matthias van de Meent <[email protected]>
2024-06-25 14:23 ` Re: add a new explain option including_query for include query string inside the json plan output Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox