Re: COPY table FROM STDIN doesn't show count tag

Поиск
Список
Период
Сортировка
От Rajeev rastogi
Тема Re: COPY table FROM STDIN doesn't show count tag
Дата
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB7713DDB0B26@SZXEML508-MBX.china.huawei.com
обсуждение исходный текст
Ответ на COPY table FROM STDIN doesn't show count tag  (Rajeev rastogi <rajeev.rastogi@huawei.com>)
Список pgsql-hackers
<div class="WordSection1"><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">On 9<sup>th</sup>
December,Amit Khandelkar wrote:<p>>1.<span style="font-size:7.0pt">      </span>slashcopyissuev1.patch :- This patch
fixesthe \COPY issue.<p class="MsoNormal">>You have removed the if condition in this statement, mentioning that it
isalways true now:<p class="MsoNormal">>-                       if (copystream == pset.cur_cmd_source)<p
class="MsoNormal">>-                              pset.lineno++;<p class="MsoNormal">>+                      
pset.lineno++;<pclass="MsoNormal">> <p class="MsoNormal"> >But copystream can be different than
pset.cur_cmd_source, right ?<p class="MsoNormal"> <p class="MsoNormal">As per the earlier code, condition result was
alwaystrue. So pset.lineno was always incremented.<p class="MsoNormal">In the earlier code pset.cur_cmd_source was sent
asparameter to function and inside the function same parameter was used with the name copystream. So on entry of this
functionboth will be one and same.<p class="MsoNormal">I checked inside the function handleCopyIn, both of these
parametersare not changing before above check. Also since pset is specific to single session, so it cannot change
concurrently.<pclass="MsoNormal">Please let me know, if I am missing something.<p class="MsoNormal"> <p
class="MsoNormal">>+      FILE       *copyStream;         /* Stream to read/write for copy command */<p
class="MsoNormal">> <pclass="MsoNormal">>There is no tab between FILE and *copystream, hence it is not aligned.<p
class="MsoNormal"> <pclass="MsoNormal">OK. I shall change accodingly.<p class="MsoNormal"> <p>>2.<span
style="font-size:7.0pt">     </span>initialcopyissuev1_ontopofslashcopy.patch : Fix for “COPY table FROM STDIN/STDOUT
doesn'tshow count tag”.<p class="MsoNormal">>The following header comments of ProcessResult() need to be modified:<p
class="MsoNormal">>*Changes its argument to point to the last PGresult of the command string,<p
class="MsoNormal">>*or NULL if that result was for a COPY FROM STDIN or COPY TO STDOUT.<p class="MsoNormal"> <p
class="MsoNormal">OK.I shall change accodingly.<p class="MsoNormal"> <p class="MsoNormal">>Regression results show
allpassed. <p class="MsoNormal">>Other than this, the patch needs a new regression test.<p class="MsoNormal"> <p
class="MsoNormal">Ihad checked the existing regression test cases and observed that it has already got all kind of test
cases.Like <p class="MsoNormal" style="text-indent:36.0pt">copy….stdin, <p class="MsoNormal"
style="text-indent:36.0pt">copy….stdout,<p class="MsoNormal" style="text-indent:36.0pt">\copy…..stdin <p
class="MsoNormal"style="text-indent:36.0pt">\copy…..stdout.<p class="MsoNormal"> <p class="MsoNormal">But since as
regressionframework runs in “quite i.e. –q” mode, so it does not show any message except query output. <p
class="MsoNormal">Soour new code change does not impact regression framework.<p class="MsoNormal"> <p
class="MsoNormal">Pleaselet me know if you were expecting any other test cases?<p class="MsoNormal"> <p
class="MsoNormal">>Idon't think we need to do any doc changes, because the doc already mentions that COPY should
showthe COUNT tag, and does not mention anything specific to client-side COPY.<p class="MsoNormal"> OK.<p
class="MsoNormal"> <pclass="MsoNormal">Please provide you opinion, based on which I shall prepare new patch and share
thesame.<p class="MsoNormal"> <p class="MsoNormal">Thanks and Regards,<p class="MsoNormal">Kumar Rajeev Rastogi<p
class="MsoNormal"><spanstyle="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span></div> 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql_check_function - rebase for 9.3
Следующее
От: KONDO Mitsumasa
Дата:
Сообщение: Re: Optimize kernel readahead using buffer access strategy