From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | codeing Conventions in NextCopyFrom |
Date: | 2024-07-08 00:22:00 |
Message-ID: | CACJufxFYxujyYwPwso8Tzahy7hoAJPN1KEzzDoa+hPQpN94dSw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-07-08 00:58:10 | Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows |
Previous Message | David Rowley | 2024-07-08 00:19:58 | Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE |