Re: moving some code out of explain.c

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Andrew Dunstan <andrew@dunslane.net>
Date: 2025-02-27T18:24:20Z
Lists: pgsql-hackers
On Tue, Feb 18, 2025 at 1:11 PM Peter Geoghegan <pg@bowt.ie> wrote:
> On Tue, Feb 18, 2025 at 1:04 PM Robert Haas <robertmhaas@gmail.com> wrote:
> > I think in cases like this there is a tendency to want to achieve an
> > even split of the original file, but in practice I think that tends
> > not to be difficult to achieve. These two patches combined move about
> > 1000 lines of code into separate files, which I think is actually
> > quite a good result for a refactoring of this sort. We might want to
> > split it up even more, but I don't feel like that has to be done in
> > the first set of patches or that all such patches have to come from
> > me. So I propose to do just this much for now.
> >
> > Comments?
>
> Seems like a good idea to me.

Thanks for the quick response! I have committed these patches.

I see that the Redis-FDW test is failing; it will now need to include
"commands/explain_format.h" -- unless we  something, of course.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Commits

  1. Avoid including explain.h in explain_format.h and explain_dr.h

  2. Create explain_dr.c and move DestReceiver-related code there.

  3. Create explain_format.c and move relevant code there.