Re: Splitting up guc.c - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Splitting up guc.c
Date
Msg-id Yx0vHEBXwcUggZYK@paquier.xyz
Whole thread Raw
In response to Splitting up guc.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Splitting up guc.c
List pgsql-hackers
On Sat, Sep 10, 2022 at 03:04:59PM -0400, Tom Lane wrote:
> Before proceeding further, I wanted to ask for comments on a design
> choice that might be controversial.  Even though I don't want to
> invent guc_hooks.c, I think we *should* invent guc_hooks.h, and
> consolidate all the GUC hook function declarations there.  The
> point would be to not have to #include guc.h in headers of unrelated
> modules.  This is similar to what we've done with utils/fmgrprotos.h,
> though the motivation is different.  I already moved a few declarations
> from guc.h to there (and in consequence had to adjust #includes in
> the modules defining those hooks), but there's a lot more to be done
> if we apply that policy across the board.  Does anybody think that's
> a bad approach, or have a better one?

One part that I have found a bit strange lately about guc.c is that we
have mix the core machinery with the SQL-callable parts.  What do you
think about the addition of a gucfuncs.c in src/backend/utils/adt/ to
split things a bit more?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~
Next
From: Isaac Morland
Date:
Subject: Re: why can't a table be part of the same publication as its schema