I've found that pg_atoi() does not behave as atoi() in empty string conversion. While atoi() transforms "" to 0, pg_atoi() complain in this situation. I made shp2pgsql.c handle empty strings in numerical fields as a workaround. --strk;