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

strk strk at keybit.net
Thu Jun 17 11:32:37 PDT 2004


On Thu, Jun 17, 2004 at 11:19:02AM -0700, Paul Ramsey wrote:
> 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?

My 2 cents: once you have them in the DBMS you'll make speedup
or space-saving adjustment. You usually have to do twining anyway,
and in the first step you just need your data in, with less problems
possible. Ideally I'd stick everything in 'text' fields :)

--strk;



More information about the postgis-devel mailing list