]> granicus.if.org Git - postgis/commitdiff
fixed wrong assumption about maximum size of integer attributes (width is maximum...
authorSandro Santilli <strk@keybit.net>
Mon, 24 Oct 2005 15:54:22 +0000 (15:54 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 24 Oct 2005 15:54:22 +0000 (15:54 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1993 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql.c

index 5e72ca4225a3c07b3c27ea0db7f806e25539f668..2f68ffa459c916db100889242669a244923e59f5 100644 (file)
@@ -541,15 +541,15 @@ CreateTable(void)
                                {
                                        printf ("int4");
                                }
-                               else if  ( field_width <= 6 )
+                               else if  ( field_width <= 5 )
                                {
                                        printf ("int2");
                                }
-                               else if  ( field_width <= 11 )
+                               else if  ( field_width <= 10 )
                                {
                                        printf ("int4");
                                }
-                               else if  ( field_width <= 20 )
+                               else if  ( field_width <= 19 )
                                {
                                        printf ("int8");
                                }
@@ -1675,7 +1675,11 @@ utf8 (const char *fromcode, char *inputbuf)
 
 /**********************************************************************
  * $Log$
+ * Revision 1.103  2005/10/24 15:54:22  strk
+ * fixed wrong assumption about maximum size of integer attributes (width is maximum size of text representation)
+ *
  * Revision 1.102  2005/10/24 11:30:59  strk
+ *
  * Fixed a bug in string attributes handling truncating values of maximum
  * allowed length, curtesy of Lars Roessiger.
  * Reworked integer attributes handling to be stricter in dbf->sql mapping