On 2/17/15 10:45 AM, Robert Haas wrote:
> You don't really need the "else" here, and in parallel cases:
> 
>                      if (*conf->variable != newval)
>                      {
> +                        record->status |= GUC_PENDING_RESTART;
>                          ereport(elevel,
>                                  (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
>                                   errmsg("parameter \"%s\" cannot be
> changed without restarting the server",
>                                          name)));
>                          return 0;
>                      }
> +                    else
> +                        record->status &= ~GUC_PENDING_RESTART;
>                      return -1;
> 
> The if-statement ends with "return 0" so there is no reason for the "else".

I kind of liked the symmetry of if/else, but I can change it.




-- 
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