Package: pgloader
Version: 2.3.1-2
Severity: normal

the manpage says:
"-F, --from
    Input line number from which we begin to process (and
    count). pgloader will skip all preceding lines."

but it seems --from does not work:
pgloader.conf:
[pgsql]
host = localhost
port = 5432
base = jens
user = jens
pass = None

log_file            = /tmp/pgloader/pgloader.log
log_min_messages    = DEBUG
client_min_messages = WARNING
#lc_messages         = C

;client_encoding = 'utf-8'
client_encoding = 'latin1'
copy_every      = 5
commit_every    = 5
#copy_delimiter  = %

null         = ""
empty_string = "\ "

max_parallel_sections = 4

[csv]
table        = test
format       = csv
filename     = test.csv
field_sep    = ,
quotechar    = "
columns      = name, id

==
simple test table:
jens=> \d test
         Tabelle »public.test«
 Spalte |        Typ        | Attribute 
--------+-------------------+-----------
 id     | integer           | 
 name   | character varying | 
==
j...@thialfi:/tmp/pgloader$ pgloader --from=2 csv
csv          WARNING  COPY error, trying to find on which line
csv          WARNING  COPY data buffer saved in
/tmp/test.4c1khr.pgloader
csv          WARNING  COPY error recovery done (1/1) in 0.038s
csv          ERROR    1 errors found into [csv] data
csv          ERROR    please read /tmp/csv.rej.log for errors log
csv          ERROR    and /tmp/csv.rej for data still to process
csv          ERROR    1 database errors occured
j...@thialfi:/tmp/pgloader$ cat test.csv 
name,id
"dkdkdk,kkk",40
j...@thialfi:/tmp/pgloader$ cat /tmp/csv.rej.log 
COPY error: FEHLER:  ungültige Eingabesyntax für ganze Zahl: »id«
CONTEXT:  COPY test, Zeile 1, Spalte id: »id«

(sorry for the german texts but 
"lc_messages         = C"
did not work - maybe another bug report?

j...@thialfi:/tmp/pgloader$ export LC_ALL=C; pgloader -F2 csv 
Exception in thread csv:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/var/lib/python-support/python2.5/pgloader/pgloader.py", line
  822, in run
    self._postinit()
  File "/var/lib/python-support/python2.5/pgloader/pgloader.py", line
  212, in _postinit
    self.db.reset()
  File "/var/lib/python-support/python2.5/pgloader/db.py", line 215, in
  reset
    self.set_lc_messages()
  File "/var/lib/python-support/python2.5/pgloader/db.py", line 149, in
  set_lc_messages
    raise PGLoader_Error, e
PGLoader_Error: FEHLER:  keine Berechtigung um Parameter �lc_messages�
zu setzen

or maybe I would have to grant some rights?)

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages pgloader depends on:
ii  python                        2.5.2-3    An interactive high-level object-o
ii  python-psycopg                1.1.21-17  Python module for PostgreSQL
ii  python-psycopg2               2.0.7-4    Python module for PostgreSQL

pgloader recommends no packages.

pgloader suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to