From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com> |
Cc: | Amit Khandekar <amit(dot)khandekar(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: COPY table FROM STDIN doesn't show count tag |
Date: | 2014-03-12 15:57:04 |
Message-ID: | 13673.1394639824@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com> writes:
> On 11 March 2014 19:52, Tom Lane wrote:
>> After sleeping on it, I'm inclined to think we should continue to not
>> print status for COPY TO STDOUT. Aside from the risk of breaking
>> scripts, there's a decent analogy to be made to SELECT: we don't print
>> a status tag for that either.
> It is correct that SELECT does not print conventional way of status tag but still it prints the number
> of rows selected (e.g. (2 rows)) along with rows actual value, which can be very well considered
> as kind of status. User can make out with this result, that how many rows have been selected.
> But in-case of COPY TO STDOUT, if we don't print anything, then user does not have any direct way of finding
> that how many rows were copied from table to STDOUT, which might have been very useful.
Uh, you mean other than the data rows that were just printed? I fail
to see how this is much different from the SELECT case:
regression=# \copy int8_tbl to stdout
123 456
123 4567890123456789
4567890123456789 123
4567890123456789 4567890123456789
4567890123456789 -4567890123456789
regression=#
(Note that I'm defining TO STDOUT from psql's perspective, ie the rows are
going to the queryFout file, which is the same place the COPY status would
get printed to.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2014-03-12 16:02:58 | Re: GIN improvements part2: fast scan |
Previous Message | Tomas Vondra | 2014-03-12 15:26:17 | Re: pgstat wait timeout (RE: contrib/cache_scan) |