[postgis-users] shp2pgsql and psql: Null values represented by \N

matt.pettis at thomson.com matt.pettis at thomson.com
Tue Dec 11 16:22:06 PST 2007


Hi,

Thanks for the advice... I removed all of the options from the command line on shp2pgsql
and got INSERT statements instead of a COPY statement from stdin.  This made it work,
even though the final output file was a bit larger (but that's no big deal to me).

Thanks for the help,
Matt


-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net on behalf of Nicolas Ribot
Sent: Tue 12/11/2007 3:07 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] shp2pgsql and psql: Null values represented by \N
 
> Hi,
>
> I am on WindowsXP.
>
> I am using shp2pgsql to create SQL to load a table to posgresql/postgis.
> some columns have null values, and are represented by \N in the output from
> this command.  However, when executing the sql output by shp2pgsql, psql
> chokes on it, with the following error message (one of many identical except
> for the number):
>
> > psql:shp_roads2_raw.sql:28656: invalid command \N
> >

Hi,
Are you sure this is the first error message you see in the file ?
I often see this error message after other, more meaningful, errors.

Nicolas
_______________________________________________
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