From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add pg_settings.pending_restart column |
Date: | 2015-03-05 03:04:34 |
Message-ID: | 54F7C7C2.7030705@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2015-03-05 03:13:28 | Re: Add pg_settings.pending_restart column |
Previous Message | Peter Eisentraut | 2015-03-05 02:59:23 | Re: CATUPDATE confusion? |