On Thu, Jun 18, 2020 at 7:01 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> Hi,
>
> While checking copy from code I found that the function parameter
> column_no is not used in CopyReadBinaryAttribute. I felt this could be
> removed.
> Attached patch contains the changes for the same.
> Thoughts?
>
I don't see any problem in removing this extra parameter.
However another thought, can it be used to report a bit meaningful
error for field size < 0 check?
if (fld_size < 0)
ereport(ERROR,
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
errmsg("invalid field size for column %d", column_no)));
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com