BUG #1643: dbf2pg broken + quick fix - Mailing list pgsql-bugs

From Boris van Schooten
Subject BUG #1643: dbf2pg broken + quick fix
Date
Msg-id 20050503174404.B3508F0B09@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #1643: dbf2pg broken + quick fix
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1643
Logged by:          Boris van Schooten
Email address:      schooten@cs.utwente.nl
PostgreSQL version: 7.4.5, 8.0.2
Operating system:   FreeBSD
Description:        dbf2pg broken + quick fix
Details:

As several people on the mailing lists have already noted, dbf2pg is broken.
 It usually fails to enter the numeric values from the dbf file in the sql
tables.  If you enable verbose output (-vv) you see "Illegal numeric value
found" errors.

As it turns out, the integer checking code (contrib/dbase/dbf2pg.c, function
isinteger) is broken.  It appears the function reports 0 in case it finds a
space in the dbf rather than a digit.  I disabled it (always made it return
1).  Now, my dbf files import fine.

pgsql-bugs by date:

Previous
From: "tirny"
Date:
Subject: BUG #1644: control structeres perfomance in pgsql
Next
From: Tom Lane
Date:
Subject: Re: BUG #1643: dbf2pg broken + quick fix