The encoding to encode strings into, is determined in the following order:
if client_encoding is set in the pgsql configuration section, that encoding is used,
if options.PG_CLIENT_ENCODING is not None, that used,
else input_encoding is used
I added a setup.py file that can do the installation with python setup.py install.
This will also build the manpage and when specifying the -m /path/to/manpage/location will also install the manpage.
The binary is also installed.
The Makefile was modified slightly because pgloade.py was moved to scripts/pgloader.
The Makefile should still work though.
…kips empty lines in the csv reader. Empty lines at the end of a file cause an list index out of range error if the table also has a reformat rule for a column. This option makes sure empty lines are skipped, and therefore the error doesn't occur.