codeing Conventions in NextCopyFrom - Mailing list pgsql-hackers

From jian he
Subject codeing Conventions in NextCopyFrom
Date
Msg-id CACJufxFYxujyYwPwso8Tzahy7hoAJPN1KEzzDoa+hPQpN94dSw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE
Next
From: Michael Paquier
Date:
Subject: Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows