Hi.

Just a few minor comments about your patch:

At 2014-06-13 11:46:21 +0530, amit.kapil...@gmail.com wrote:
>
> +  <title>Notes</title>
> +
> +  <para>
> +    This command will not allow to set parameters that are disallowed or
> +    excluded in postgresql.conf. It also disallows to set configuration
> +    parameter <xref linkend="guc-data-directory">.
> +  </para>
> + </refsect1>

I suggest the following wording:

    This command may not be used to set
    <xref linkend="guc-data-directory">
    or any parameters that are not allowed in postgresql.conf.

> +     /*
> +      * Disallow parameter's that are excluded or disallowed in
> +      * postgresql.conf.
> +      */

"parameters", no apostrophe.

>       if ((record->context == PGC_INTERNAL) ||
> -             (record->flags & GUC_DISALLOW_IN_FILE))
> -             ereport(ERROR,
> -                             (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
> -                              errmsg("parameter \"%s\" cannot be changed",
> -                                             name)));
> +             (record->flags & GUC_DISALLOW_IN_FILE) ||
> +             (record->flags & GUC_DISALLOW_IN_AUTO_FILE) ||
> +             (record->flags & GUC_NOT_IN_SAMPLE))
> +              ereport(ERROR,
> +                              (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
> +                               errmsg("parameter \"%s\" cannot be changed",
> +                                              name)));

I looked at the settings that are marked GUC_NOT_IN_SAMPLE but neither
PGC_INTERNAL nor GUC_DISALLOW_IN_*FILE. I don't feel strongly about it,
but I don't see any particularly good reason to exclude them here.

(I also agree with Fujii-san that it isn't worth making extensive
changes to avoid data_directory being offered via tab-completion.)

-- Abhijit


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to