pgloader/test
Dimitri Fontaine ef358c0b7d Take benefits of PostgreSQL COPY error CONTEXT.
This message has the line number where the erroneous data was found on the
server, and given the pre-processing we already done at that point, it's
easy to convert that number into an index into the current batch, an array.

To do do, we need Postmodern to expose the CONTEXT error message and we need
to parse it. The following pull request cares about the Postmodern side of
things:

  https://github.com/marijnh/Postmodern/pull/46

The parsing is done as simply as possible, only assuming that the error
message is using comma separators and having the line number in second
position. The parsing as done here should still work with localized message
strings.

  CONTEXT: COPY errors, line 3, column b: "2006-13-11"

This change should significantly reduce the cost of error processing.
2013-12-25 21:43:22 +01:00
..
data Improve tests and add test cases. 2013-11-26 16:48:45 +01:00
parse Review some default casting rules, in particular add tinyint(1) to boolean. 2013-11-18 10:28:38 +01:00
sqlite Desultory improve the SQLite importer. 2013-11-21 21:34:02 +01:00
allcols.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
archive.load Improve tests and add test cases. 2013-11-26 16:48:45 +01:00
bossa-all.load Improve tests and add test cases. 2013-11-26 16:48:45 +01:00
bossa.load Improve tests and add test cases. 2013-11-26 16:48:45 +01:00
bossa.sql Improve tests and add test cases. 2013-11-26 16:48:45 +01:00
census-places.load Pick a CL encoding name found both in SBCL and CCL for the census test. 2013-12-24 19:37:15 +01:00
csv-before-after.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
csv-empty-as-null.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
csv.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
dbf-zip.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
dbf.load Improve tests and add test cases. 2013-11-26 16:48:45 +01:00
errors.load Take benefits of PostgreSQL COPY error CONTEXT. 2013-12-25 21:43:22 +01:00
fixed.load Implement support for FIXED COLS input files, reaching release candidate status. 2013-11-07 15:39:28 +01:00
Makefile Add MySQL (MariaDB) support in tests. 2013-12-03 22:06:10 +01:00
nofile.load Improve tests and add test cases. 2013-11-26 16:48:45 +01:00
partial.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
README.md Port tests from pgloader 2.x, implement trailing-sep. 2013-10-13 22:10:07 +02:00
reformat.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
sakila.load Add support for connecting to PostgreSQL with Unix Domain Sockets, fixing #15. 2013-11-22 17:19:48 +01:00
serial.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
simple.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00
sqlite.load Desultory improve the SQLite importer. 2013-11-21 21:34:02 +01:00
udc.load Improve parsing of list separating commas wrt to whitespacing. 2013-11-23 21:49:08 +01:00
xzero.load Improve database connection parsing to use sensible defaults. 2013-10-19 22:39:09 +02:00

pgloader tests

In the parser directory are tests for the parser only, in the current directory are tests that can be run to import data.