Re: COPY table FROM STDIN doesn't show count tag
От | Amit Khandekar |
---|---|
Тема | Re: COPY table FROM STDIN doesn't show count tag |
Дата | |
Msg-id | CACoZds0MVO_1d7rWZTqpWLFKS=SCXTVwtB_yxdrBWsPaL50ySA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: COPY table FROM STDIN doesn't show count tag (Rajeev rastogi <rajeev.rastogi@huawei.com>) |
Список | pgsql-hackers |
On 29 November 2013 19:20, Rajeev rastogi <rajeev.rastogi@huawei.com> wrote:
On 26 November 2013, Amit Khandelkar wrote:
>Can you please submit the \COPY patch as a separate patch ? Since these are two different issues, I would like to have these two fixed and committed separately. You can always test the \COPY issue using \COPY TO followed by INSERT.
Please find the attached two separate patches:
Thanks.
1. slashcopyissuev1.patch :- This patch fixes the \COPY issue.
You have removed the if condition in this statement, mentioning that it is always true now:
- if (copystream == pset.cur_cmd_source)
- pset.lineno++;
+ pset.lineno++;
But copystream can be different than pset.cur_cmd_source , right ?
+ FILE *copyStream; /* Stream to read/write for copy command */
There is no tab between FILE and *copystream, hence it is not aligned.
2. initialcopyissuev1_ontopofslashcopy.patch : Fix for “COPY table FROM STDIN/STDOUT doesn't show count tag”.
The following header comments of ProcessResult() need to be modified:
* Changes its argument to point to the last PGresult of the command string,
* or NULL if that result was for a COPY FROM STDIN or COPY TO STDOUT.
Regression results show all passed.
Other than this, the patch needs a new regression test.
I don't think we need to do any doc changes, because the doc already mentions that COPY should show the COUNT tag, and does not mention anything specific to client-side COPY.
Thanks and Regards,
Kumar Rajeev Rastogi
В списке pgsql-hackers по дате отправления: