[postgis-users] Maintain length and precision for numneric fields in pgsql2shp and shp2pgsql
Peter Hopfgartner
peter.hopfgartner at r3-gis.com
Wed Jan 23 03:39:07 PST 2008
Dear PostGIS community members,
we were looking at the tables generated by shp2pgsql. As it seems,
numeric(m, 0) is mapped, if possible to integers, and numeric(m,n) is
mapped to numeric.
We would like to optionally maintain the numeric length and precision
for our data imports. Looking at shp2pgsql.c, this should be rather
simple. Basically, we could add an option, let's say '-K' for keep
precision, and modify the code around line 550.
A similar change could be done for pgsql2shp, modifying the SQL query,
which gets the type information from PostgreSQL and changing the code
generating the dbf header.
If such a change is welcomed, we can try to have it done soon.
Regards,
Peter Hopfgartner and Sergio Segala
R3 GIS
http://www.r3-gis.com
More information about the postgis-users
mailing list