Thread: codeing Conventions in NextCopyFrom

codeing Conventions in NextCopyFrom

From
jian he
Date:
NextCopyFrom, currently, it is:
--------------
if (cstate->defaults[m])
{
......
}

/*
* If ON_ERROR is specified with IGNORE, skip rows with soft
* errors
*/
else if (!InputFunctionCallSafe(&in_functions[m],
string,
typioparams[m],
att->atttypmod,
(Node *) cstate->escontext,
&values[m]))
{
Assert(cstate->opts.on_error != COPY_ON_ERROR_STOP);

---------------
should it be:

if (cstate->defaults[m])
{
....
}
else if (!InputFunctionCallSafe(&in_functions[m],
string,
typioparams[m],
att->atttypmod,
(Node *) cstate->escontext,
&values[m]))
{
/*
* If ON_ERROR is specified with IGNORE, skip rows with soft
* errors
*/
Assert(cstate->opts.on_error != COPY_ON_ERROR_STOP);

?


https://www.postgresql.org/docs/devel/source-format.html
did't mention it, so I came to ask.
(personally,  "if" and "else if" no empty new line make it more
readable, i think.