[postgis-users] Why I got this using shp2pgsql: ERROR: invalid input syntax for type numeric : ""
strk
strk at keybit.net
Tue Aug 10 15:56:45 PDT 2004
Renato,
you're doing nothing wrong, it is a bug.
It is fixed in current CVS version (actualy in the first revision after release).
--strk;
On Tue, Aug 10, 2004 at 05:36:43PM -0500, Renato F. Salas wrote:
> Hi I've just installed PostGIS 0.8.2 with PostgreSQL 7.4.3 and use
> shp2pgsql to generate a .sql file for loading my shape files onto the
> database.
>
> When I run the .sql using pgsql I got this:
>
> [postgres at rsalas postgres]$ psql -d test -f Perudep.sql
> BEGIN
> psql:Perudep.sql:2: ERROR: invalid input syntax for type numeric: ""
> psql:Perudep.sql:3: ERROR: current transaction is aborted, commands
> ignored until end of transaction block
> ....[a lot more]
>
> The problem seem to be that the auto-generated sql statements place ''
> characters on the numeric values and the INSERT statements rejects to
> use them as in:
>
> INSERT INTO "testtable"
> (gid,"area_","perimeter","perudep_","perudep_id","codigo_dep","nombre")
> VALUES ('0','','3.738656662115','4','3','24','TUMBES');
>
> The table structure is:
>
> gid | integer |
> area_ | numeric(19,0) |
> perimeter | numeric(19,0) |
> perudep_ | numeric(19,0) |
> perudep_id | numeric(19,0) |
> codigo_dep | character varying |
> nombre | character varying |
>
> Am I doing something wrong?
>
> tHAnks in advance for you help
>
> Renato F. Salas
> www.renatonow.com
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list