Skip to content

Support Postgres Explain options #1425

Closed
@kysshsy

Description

@kysshsy

support EXPLAIN [ ( option [, ...] ) ] statement , like EXPLAIN (analyze true, option_name option_arg) select * from t1 .
Postgres doc.

in Postgres

explain (analyze true) select * from t100;
                                            QUERY PLAN
--------------------------------------------------------------------------------------------------
 Seq Scan on t100  (cost=0.00..35.50 rows=2550 width=4) (actual time=0.007..0.008 rows=0 loops=1)
 Planning Time: 0.040 ms
 Execution Time: 0.019 ms
(3 rows)

explain (aaa) select * from t100;
ERROR:  unrecognized EXPLAIN option "aaa"
LINE 1: explain (aaa) select * from t100;

I want the parser to handle options in a way similar to how the Postgres parser does. Specifically, I want it to be able to parse key-value pairs and validate them when executing the EXPLAIN command. This would allow users to define and include custom options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions