Re: START/END line number for COPY FROM

2019-01-07 Thread Peter Eisentraut
On 06/01/2019 12:59, Surafel Temesgen wrote: > it is not always the case to have in control of the data importing it > may came from > external system But the problem that David described remains: If your data loading requirement is so complicated that you need to load the file in chunks, then do

Re: START/END line number for COPY FROM

2019-01-06 Thread Surafel Temesgen
Hi, On Sat, Jan 5, 2019 at 1:10 PM David Rowley wrote: > On Fri, 21 Dec 2018 at 02:02, Surafel Temesgen > wrote: > > Currently we can skip header line on COPY FROM but having the ability to > skip and stop copying at any line can use to divide long copy operation and > enable to copy a subset of

Re: START/END line number for COPY FROM

2019-01-05 Thread David Rowley
On Fri, 21 Dec 2018 at 02:02, Surafel Temesgen wrote: > Currently we can skip header line on COPY FROM but having the ability to skip > and stop copying at any line can use to divide long copy operation and enable > to copy a subset of the file and skipping footer. Attach is a patch for it I'm

Re: START/END line number for COPY FROM

2019-01-05 Thread Surafel Temesgen
Hi, On Fri, Jan 4, 2019 at 5:37 PM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > It seems a bit fragile to me if I want to skip a footer and need to > figure out the total line count, subtract one, and then oh, was it zero- > or one-based. > > But normally we don't say start copyin

Re: START/END line number for COPY FROM

2019-01-04 Thread Peter Eisentraut
On 20/12/2018 14:02, Surafel Temesgen wrote: > Currently we can skip header line on COPY FROM but having the ability to > skip and stop copying at any line can use to divide long copy operation > and enable to copy a subset of the file and skipping footer. It seems a bit fragile to me if I want to

Re: START/END line number for COPY FROM

2018-12-21 Thread Tom Lane
Surafel Temesgen writes: > Currently we can skip header line on COPY FROM but having the ability to > skip and stop copying at any line can use to divide long copy operation and > enable to copy a subset of the file and skipping footer. Attach is a patch > for it I do not think this is a good ide

START/END line number for COPY FROM

2018-12-20 Thread Surafel Temesgen
Hi, Currently we can skip header line on COPY FROM but having the ability to skip and stop copying at any line can use to divide long copy operation and enable to copy a subset of the file and skipping footer. Attach is a patch for it Regards Surafel diff --git a/doc/src/sgml/ref/copy.sgml b/do