dbf2sql - Insert xBase-style .dbf-files into a PostgreSQL-table
SYNOPSISdbf2pg [options] dbf-file
[-v[v]] [-f] [-u | -l] [-c | -D] [-d database] [-t table] [-h host] [-s
oldname=[newname][,oldname=[newname]]] [-b start] [-e end] [-W] [-U
username] [-B transaction_size] [-F charset_from [-T charset_to]]
This manual page documents the program dbf2pg. It takes an xBase-style
.dbf-file, and inserts it into the specified database and table.
-v Display some status-messages.
-vv Also display progress.
-f Convert all field-names from the .dbf-file to lowercase.
-u Convert the contents of all fields to uppercase.
-l Convert the contents of all fields to lowercase.
-c Create the table specified with -t. If this table already
exists, first DROP it.
-D Delete the contents of the table specified with -t. Note that
this table has to exists. An error is returned if this is not
-W Ask for password.
Specify the database to use. An error is returned if this data‐
base does not exists. Default is "test".
Specify the table to insert in. An error is returned if this ta‐
ble does not exists. Default is "test".
Specify the host to which to connect. Default is "localhost".
Change the name of a field from oldname to newname. This is
mainly used to avoid using reserved SQL-keywords. Example:
This is done before the -f operator has taken effect!
Specify the first record-number in the xBase-file we will
-e end Specify the last record-number in the xBase-file we will insert.
Specify the number of records per transaction, default is all
Log as the specified user in the database.
If specified, it converts the data from the specified charset.
Consult your system documentation to see the convertions avail‐
Together with -F charset_from , it converts the data to the
specified charset. Default is "ISO-8859-1".
This program is affected by the environment-variables as used by Post‐
gresSQL. See the documentation of PostgresSQL for more info.
Fields larger than 8192 characters are not supported and could break
Some charset convertions could cause the output to be larger than the
input and could break the program.