From: | Chantal Keller <chantal(dot)keller(at)universite-paris-saclay(dot)fr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Explain and filter over subplans |
Date: | 2024-01-19 09:17:46 |
Message-ID: | d3339be7-4e51-4119-8789-531583189a0a@universite-paris-saclay.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you very much for your quick answer and patch!
I tested and this is exactly what I was looking for :-)
Best
Chantal
Le 18/01/2024 à 18:55, Tom Lane a écrit :
> Chantal Keller <chantal(dot)keller(at)universite-paris-saclay(dot)fr> writes:
>> I would like "explain" to output formulas for filtering over
>> subplans. Is it possible?
>
> No, and that's been a to-do item for a long time.
>
> Currently, EXPLAIN just ignores the "testexpr" field of SubPlan
> nodes, which is what you are after. We could print it, if we
> could figure out an intelligible representation. In the example
> you give, the testexpr would probably render as "t.a >= $0"
> where $0 represents the subplan's output column.
>
> A very rough sketch, perhaps, is that instead of just
> "(SubPlan 1)", we could print "(ALL t.a >= $0 FROM SubPlan 1)".
> Some of the other SubLinkTypes might be harder to represent
> in a way that makes sense to users.
>
> I made a quick-hack patch to play with, if you're interested.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2024-01-19 16:24:56 | B-tree index balance? |
Previous Message | Masahiko Sawada | 2024-01-19 08:09:47 | Re: Emitting JSON to file using COPY TO |