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

From: Amit Khandekar <amit(dot)khandekar(at)enterprisedb(dot)com>
To: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY table FROM STDIN doesn't show count tag
Date: 2013-12-09 06:57:27
Message-ID: CACoZds0MVO_1d7rWZTqpWLFKS=SCXTVwtB_yxdrBWsPaL50ySA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29 November 2013 19:20, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)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
>
>
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Karsten Hilbert 2013-12-09 07:25:34 Re: [GENERAL] pg_upgrade ?deficiency
Previous Message Etsuro Fujita 2013-12-09 06:48:16 Re: Show lossy heap block info in EXPLAIN ANALYZE for bitmap heap scan