From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: moving some code out of explain.c |
Date: | 2025-02-27 19:41:05 |
Message-ID: | CA+TgmobD1_GOucGsr00T8nieCmjaNBO+CrwFUEziBgicYNDy7w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 27, 2025 at 2:21 PM Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> On 2025-Feb-27, Robert Haas wrote:
> > I see that the Redis-FDW test is failing; it will now need to include
> > "commands/explain_format.h" -- unless we something, of course.
>
> I wonder if it was really a useful idea to move the declarations of
> those functions from explain.h to the new explain_format.h file. It
> seems that this new file now has a bunch of declarations that have
> always been something of a public interface, together with others that
> are only of internal explain.c interest, such as
> ExplainOpenSetAsideGroup() and friends.
I'm not completely certain about what I did with the header files, but
for a somewhat different reason than what you mention here.
I don't see ExplainOpenSetAsideGroup() as being any different from
anything else that I put in explain_format.h -- it's something that
code might want to call if it's generating EXPLAIN output, and
otherwise not. But maybe I'm missing something -- what makes you see
it as different from the other stuff?
The thing that was bugging me a bit is that explain_format.h includes
explain.h. It would be nice if those were more independent of each
other, but I'm not sure if there's a reasonably clean way of
accomplishing that. When deciding what to do there, it's also worth
keeping in mind that there may be more opportunities to move stuff out
of explain.c, so we might not want to get too dogmatic about the
header file organization just yet. But, I'm certainly open to ideas.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Herrera | 2025-02-27 19:50:22 | Re: Simplify the logic a bit (src/bin/scripts/reindexdb.c) |
Previous Message | Álvaro Herrera | 2025-02-27 19:21:52 | Re: moving some code out of explain.c |