From ddc0eea47ea453ac79d02e8e325c67545f8fd15e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 24 Oct 2005 15:54:16 +0000 Subject: [PATCH] fixed wrong assumption about maximum size of integer attributes (width is maximum size of text representation) git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@1992 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/shp2pgsql.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/loader/shp2pgsql.c b/loader/shp2pgsql.c index a7f423381..664a9daff 100644 --- a/loader/shp2pgsql.c +++ b/loader/shp2pgsql.c @@ -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. * -- 2.40.0