Re: Improve GetConfigOptionValues function

From: Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improve GetConfigOptionValues function
Date: 2023-01-23 09:59:16
Message-ID: CAMm1aWbGG=zxq40UvKQhSKj2pc=+fCdScbEUV5fNO6N7bdfXjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> The v2 patch looks good to me except the comment around
> ConfigOptionIsShowable() which is too verbose. How about just "Return
> whether the GUC variable is visible or not."?

Sounds good. Updated in the v3 patch attached.

> I think you can add it to CF, if not done, to not lose track of it.

Added https://commitfest.postgresql.org/42/4140/

Thanks & Regards,
Nitin Jadhav

On Mon, Jan 23, 2023 at 11:30 AM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Thu, Jan 19, 2023 at 3:27 PM Nitin Jadhav
> <nitinjadhavpostgres(at)gmail(dot)com> wrote:
> >
> > > Possibly a better answer is to refactor into separate functions,
> > > along the lines of
> > >
> > > static bool
> > > ConfigOptionIsShowable(struct config_generic *conf)
> > >
> > > static void
> > > GetConfigOptionValues(struct config_generic *conf, const char **values)
> >
> > Nice suggestion. Attached a patch for the same. Please share the
> > comments if any.
>
> The v2 patch looks good to me except the comment around
> ConfigOptionIsShowable() which is too verbose. How about just "Return
> whether the GUC variable is visible or not."?
>
> I think you can add it to CF, if not done, to not lose track of it.
>
> --
> Bharath Rupireddy
> PostgreSQL Contributors Team
> RDS Open Source Databases
> Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v3-0001-Refactor-GetConfigOptionValues-function.patch application/octet-stream 4.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Egor Rogov 2023-01-23 10:01:46 Re: pg_stats and range statistics
Previous Message Amit Kapila 2023-01-23 08:46:52 Re: Support logical replication of DDLs