NAME
pg.in.dbf - Imports a dBase table into PostgreSQL. (GRASS-RDBMS
Interface import Program)
SYNOPSIS
pg.in.dbf
pg.in.dbf help
pg.in.dbf input=name [dumpmode=name]
[delimiter=char] [null=string]
DESCRIPTION
pg.in.dbf imports a dBase database table into PostgreSQL for later
use with GRASS-RDBMS modules.
The program can run in two modes:
'admin' is when the GRASS user has a superuser account in Postgres,
'normal' - when the Postgres user is normal (not administrator).
You should choose the mode adequately.
In the latter case, large files can take much time to import (as each
line would be inserted separately).
When you have PostgreSQL admin privileges, the import of the DBF
database is done via the COPY FROM command. This allows to
tune several options :
You will be asked if you want to save the dump of the data
from the dbf file into text format. In this case you MUST
give an absolute path name, and you need, obviously, to have
the corresponding rights ;
You can also specify a custom delimiter to be used to
separate the fields (the default for the COPY FROM command is the
tabulation);
And finally you can specify a custom null string i.e. a
string PostgreSQL has to interpret as a NULL value (the default is the
empty string, meaning that void fields will be considered null).
COMMAND LINE OPTIONS
Parameters:
-
input=name
-
Name of .dbf file to be imported (example: 'simple.dbf')
-
dumpmode=name
-
Admin/normal user dump mode [Default = Postgres super-user]
-
delimiter=char
-
Specify char as the delimiter (escaped sequences are allowed).
[Default = tabulation '\t']
-
null=string
-
Specify the string PostgreSQL will have to consider as a NULL value.
[Default = empty string ""]
BUGS
None known.
NOTE
This program requires the Postgres database software.
SEE ALSO
g.column.pg, g.select.pg,
g.stats.pg, g.table.pg,
d.site.pg, d.vect.pg,
d.what.r.pg, d.what.s.pg,
d.what.v.pg, r.reclass.pg,
r.rescale.pg, v.reclass.pg
AUTHOR
Alex Shevlakov (sixote@yahoo.com)
Some additions and fixes by Thierry Laronde (tlaronde@polynum.org)