Re: warn if GUC set to an invalid shared library

Поиск
Список
Период
Сортировка
От Shubham Khanna
Тема Re: warn if GUC set to an invalid shared library
Дата
Msg-id CAHv8RjJh7bXVwJG-mkvH-yWnDCSrTotk7-Kmd0n2YdESht7mGA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: warn if GUC set to an invalid shared library  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: warn if GUC set to an invalid shared library  (John Naylor <johncnaylorls@gmail.com>)
Список pgsql-hackers
On Thu, Dec 28, 2023 at 10:54 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> On Sat, Oct 29, 2022 at 10:40 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
> > > > > On Fri, Sep 02, 2022 at 05:24:58PM -0500, Justin Pryzby wrote:
> > > > > > It caused no issue when I changed:
> > > > > >
> > > > > >                         /* Check that it's acceptable for the indicated parameter */
> > > > > >                         if (!parse_and_validate_value(record, name, value,
> > > > > > -                                                     PGC_S_FILE, ERROR,
> > > > > > +                                                     PGC_S_TEST, ERROR,
> > > > > >                                                       &newval, &newextra))
> > > > > >
> > > > > > I'm not sure where to go from here.
> > > > >
> > > > > I'm hoping for some guidance ; this simple change may be naive, but I'm not
> > > > > sure what a wider change would look like.
>
> I'm still hoping.
>
> > > PGC_S_TEST is a better fit, so my question is whether it's really that
> > > simple ?
> >
> > I've added the trivial change as 0001 and re-opened the patch (which ended
> > up in January's CF)
> >
> > If for some reason it's not really as simple as that, then 001 will
> > serve as a "straw-man patch" hoping to elicit discussion on that point.
>
> > From defdb57fe0ec373c1eea8df42f0e1831b3f9c3cc Mon Sep 17 00:00:00 2001
> > From: Justin Pryzby <pryzbyj@telsasoft.com>
> > Date: Fri, 22 Jul 2022 15:52:11 -0500
> > Subject: [PATCH v6 1/4] WIP: test GUCs from ALTER SYSTEM as PGC_S_TEST not
> >  FILE
> >
> > WIP: ALTER SYSTEM should use PGC_S_TEST rather than PGC_S_FILE
> >
> > Since the value didn't come from a file.  Or maybe we should have
> > another PGC_S_ value for this, or a flag for 'is a test'.
> > ---
> >  src/backend/utils/misc/guc.c | 2 +-
> >  src/include/utils/guc.h      | 1 +
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
> > index 6f21752b844..ae8810591d6 100644
> > --- a/src/backend/utils/misc/guc.c
> > +++ b/src/backend/utils/misc/guc.c
> > @@ -4435,7 +4435,7 @@ AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt)
> >
> >                       /* Check that it's acceptable for the indicated parameter */
> >                       if (!parse_and_validate_value(record, name, value,
> > -                                                                               PGC_S_FILE, ERROR,
> > +                                                                               PGC_S_TEST, ERROR,
> >                                                                                 &newval, &newextra))
> >                               ereport(ERROR,
> >                                               (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
>
> This is rebased over my own patch to enable checks for
> REGRESSION_TEST_NAME_RESTRICTIONS.
>
I was reviewing the Patch and came across a minor issue that the Patch
does not apply on the current Head. Please provide the updated version
of the patch.

Thanks and Regards,
Shubham Khanna.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: doc patch: note AttributeRelationId passed to FDW validator function
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: doc patch: note AttributeRelationId passed to FDW validator function