]> 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:16 +0000 (15:54 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 24 Oct 2005 15:54:16 +0000 (15:54 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@1992 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql.c

index a7f4233819fde1655b236d2b5570045e2250bc8f..664a9daff3380a00dca4462390cef44ac044a349 100644 (file)
@@ -536,15 +536,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");
                                }
@@ -1670,6 +1670,9 @@ utf8 (const char *fromcode, char *inputbuf)
 
 /**********************************************************************
  * $Log$
+ * Revision 1.88.2.12  2005/10/24 15:54:16  strk
+ * fixed wrong assumption about maximum size of integer attributes (width is maximum size of text representation)
+ *
  * Revision 1.88.2.11  2005/10/24 11:31:27  strk
  * Backported stricter STRING and INTEGER attributes handling.
  *