Commit Graph

4 Commits

Author SHA1 Message Date
Bruce Momjian 82bade79dc dbf2pg - Insert xBase-style .dbf-files into a PostgreSQL-table
There is an option "-s oldname=newname", which changes the old field name of
  the dbf-file to the newname in PostgeSQL. If the length of the new name is 0,
  the field is skiped. If you want to skip the first field of the dbf-file,
  you get the wildest error-messages from the backend.
  dbf2pg load the dbf-file via "COPY tablename FROM STDIN". If you skip the
  first field, it is an \t to much in STDIN.

A fix could be an counter j=0, which increments only, if a field is imported
(IF (strlen(fields[h].db_name)> 0) j++. And only if j > 1 (if an other field is
imported) the \t is printed.

An other small bug in the README:
-s start
              Specify  the  first record-number in the xBase-file
              we will insert.
should be
-e start
              Specify  the  first record-number in the xBase-file
              we will insert.

Thomas Behr
2003-07-31 02:12:43 +00:00
Bruce Momjian 491545fff4 Do not require iconv for dbase conversion. 2001-12-21 05:29:46 +00:00
Bruce Momjian eb36cdd562 Add needed libiconv link to contrib/dbase, per Christopher Kings-Lynne 2001-12-21 04:13:12 +00:00
Bruce Momjian c2a062b7fe Add dbase conversion utility to /contrib. 2001-05-10 14:41:23 +00:00