[postgis-devel] shp2pgsql - What's Worse, Slow Load, or Bad Types

Paul Ramsey pramsey at refractions.net
Thu Jun 17 11:19:02 PDT 2004


Right now, shp2pgsql figures out what types to use for columns based on 
the DBF header. Trouble is, the field size defined in the header is 
often much larger than that needed for the data. People use large 
headers "for safety", etc. The result, particularly for integers, is 
that we are getting bigint column types alot more often than we need to.
The only way to "fix" this would be to scan the whole input file for the 
maximum values of all integer fields, and then set the field type 
appropriately.

Problem worth addressing, or bugbear?

-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_




More information about the postgis-devel mailing list