Re: Planner debug views
| От | Tom Lane |
|---|---|
| Тема | Re: Planner debug views |
| Дата | |
| Msg-id | 25538.1438119787@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Planner debug views (Qingqing Zhou <zhouqq.postgres@gmail.com>) |
| Ответы |
Re: Planner debug views
|
| Список | pgsql-hackers |
Qingqing Zhou <zhouqq.postgres@gmail.com> writes:
> Not sure if I got it: so EXPLAIN will return tuples to libpq client. But
> how do we store these returned tuples (RelOptInfo, Path etc) so we can
> throw queries against them later?
> Something like this:
> INSERT INTO my_space SELECT (EXPLAIN SELECT ...); -- won't get parsed
You can do something like that in plpgsql, for example
declare t text;
for t in EXPLAIN SELECT ... loop insert into whatever values(t); end loop;
There's an example of doing this sort of thing in the brin.sql regression
test, where it's used to verify that we're getting the plan type we
expect.
I don't feel a strong need to invent additional forms of that wheel.
regards, tom lane
В списке pgsql-hackers по дате отправления: