Widen COPY FROM's current-line-number counter from 32 to 64 bits.
Widen COPY FROM's current-line-number counter from 32 to 64 bits.

Because the code for the HEADER option skips a line when this counter
is zero, a very long COPY FROM WITH HEADER operation would drop a line
every 2^32 lines.  A lesser but still unfortunate problem is that errors
would show a wrong input line number for errors occurring beyond the
2^31'st input line.  While such large input streams seemed impractical
when this code was first written, they're not any more.  Widening the
counter (and some associated variables) to uint64 should be enough to
prevent problems for the foreseeable future.

David Rowley

Discussion: 153b17036df6615905f2c465b27a60835b103d6f@mail.gmail.com

adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,lisakowen/gpdb,greenplum-db/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,adam8157/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,xinzweb/gpdb