Re: Cleanup - Removal of unused function parameter from CopyReadBinaryAttribute

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Cleanup - Removal of unused function parameter from CopyReadBinaryAttribute
Дата
Msg-id CALj2ACUv1+DpKEuRAryTMPjqOidjgGFGA4QQB_ZYFuJef8ap_Q@mail.gmail.com
обсуждение исходный текст
Ответ на Cleanup - Removal of unused function parameter from CopyReadBinaryAttribute  (vignesh C <vignesh21@gmail.com>)
Ответы Re: Cleanup - Removal of unused function parameter fromCopyReadBinaryAttribute  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
On Thu, Jun 18, 2020 at 7:01 PM vignesh C <vignesh21@gmail.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans
Следующее
От: "Winfield, Steven"
Дата:
Сообщение: Mark btree_gist functions as PARALLEL SAFE