PostgreSQL source code: copy command

Поиск
Список
Период
Сортировка
От Adam Dziedzic
Тема PostgreSQL source code: copy command
Дата
Msg-id 55F31370.2010109@gmail.com
обсуждение исходный текст
Ответы Re: PostgreSQL source code: copy command  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hello,

in file: /src/backend/command/copy.c
I found that it can happen that there is nothing in the buffer (fe_msgbuf) to be written to a file and there is only a check of count (which in this case would be 0):

498  if (fwrite(fe_msgbuf->data, fe_msgbuf->len, 1,
499  cstate->copy_file) != 1 ||
500  ferror(cstate->copy_file))
501

Maybe, before the fwrite we should check if fe_msgbuf->len > 0.


--
With kind regards,
Adam Dziedzic
Вложения

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

Предыдущее
От: James Keener
Дата:
Сообщение: Re: PostgreSQL, JDBC and BObj
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL source code: copy command