~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to contrib/dbase/dbf2pg.1

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH dbf2sql 1L \" -*- nroff -*-
 
2
.SH NAME
 
3
dbf2sql \- Insert xBase\-style .dbf\-files into a PostgreSQL\-table
 
4
.SH SYNOPSIS
 
5
.B dbf2pg [options] dbf-file
 
6
.br
 
7
.br
 
8
Options:
 
9
.br
 
10
[-v[v]] [-f] [-u | -l] [-c | -D] [-d database] [-t table]
 
11
[-h host] [-s oldname=[newname][,oldname=[newname]]]
 
12
[-b start] [-e end] [-W] [-U username] [-B transaction_size]
 
13
[-F charset_from [-T charset_to]]
 
14
 
 
15
.SH DESCRIPTION
 
16
This manual page documents the program
 
17
.BR dbf2pg.
 
18
It takes an xBase-style .dbf-file, and inserts it into the specified
 
19
database and table.
 
20
.SS OPTIONS
 
21
.TP
 
22
.I "\-v"
 
23
Display some status-messages.
 
24
.TP
 
25
.I "-vv"
 
26
Also display progress.
 
27
.TP
 
28
.I "-f"
 
29
Convert all field-names from the .dbf-file to lowercase.
 
30
.TP
 
31
.I "-u"
 
32
Convert the contents of all fields to uppercase.
 
33
.TP
 
34
.I "-l"
 
35
Convert the contents of all fields to lowercase.
 
36
.TP
 
37
.I "-c"
 
38
Create the table specified with
 
39
.IR \-t .
 
40
If this table already exists, first
 
41
.BR DROP
 
42
it.
 
43
.TP
 
44
.I "-D"
 
45
Delete the contents of the table specified with
 
46
.IR \-t .
 
47
Note that this table has to exists. An error is returned if this is not the
 
48
case.
 
49
.TP
 
50
.I "-W"
 
51
Ask for password.
 
52
.TP
 
53
.I "-d database"
 
54
Specify the database to use. An error is returned if this database does not
 
55
exists. Default is "test".
 
56
.TP
 
57
.I "-t table"
 
58
Specify the table to insert in. An error is returned if this table does not
 
59
exists. Default is "test".
 
60
.TP
 
61
.I "-h host"
 
62
Specify the host to which to connect. Default is "localhost".
 
63
.TP
 
64
.I "-s oldname=newname[,oldname=newname]"
 
65
Change the name of a field from
 
66
.BR oldname
 
67
to
 
68
.BR newname .
 
69
This is mainly used to avoid using reserved SQL-keywords. Example:
 
70
.br
 
71
.br
 
72
-s SELECT=SEL,COMMIT=doit
 
73
.br
 
74
.br
 
75
This is done
 
76
.BR before
 
77
the
 
78
.IR -f
 
79
operator has taken effect!
 
80
.TP
 
81
.I "-b start"
 
82
Specify the first record-number in the xBase-file we will insert.
 
83
.TP
 
84
.I "-e end"
 
85
Specify the last record-number in the xBase-file we will insert.
 
86
.TP
 
87
.I "-B transaction_size"
 
88
Specify the number of records per transaction, default is all records.
 
89
.TP
 
90
.I "-U username"
 
91
Log as the specified user in the database.
 
92
.TP
 
93
.I "-F charset_from"
 
94
If specified, it converts the data from the specified charset. Example:
 
95
.br
 
96
.br
 
97
-F IBM437
 
98
.br
 
99
.br
 
100
Consult your system documentation to see the convertions available.
 
101
.TP
 
102
.I "-T charset_to"
 
103
Together with
 
104
.I "-F charset_from"
 
105
, it converts the data to the specified charset. Default is "ISO-8859-1".
 
106
.SH ENVIRONMENT
 
107
This program is affected by the environment-variables as used
 
108
by
 
109
.B PostgresSQL.
 
110
See the documentation of PostgresSQL for more info.
 
111
.SH BUGS
 
112
Fields larger than 8192 characters are not supported and could break the
 
113
program.
 
114
.br
 
115
Some charset convertions could cause the output to be larger than the input
 
116
and could break the program.