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