[postgis-users] Problem importing from coverage to postgres using ogr2ogr

Paul Ramsey pramsey at refractions.net
Thu Feb 7 14:44:36 PST 2008

OGR is probably trying to bring the column names in literally and '-'  
is not a happy character for column names.  Either OGR could quote  
all all the references to bring them in as-is, or it could  
transliterate them to _ on the fly. The latter provides less data  
fidelity, but more usability once the info is in the database...  
things like "-" and "mIxeD CaSe" require that you use quotes around  
all your statements in SQL, which gets annoying after a while.


On 7-Feb-08, at 2:20 PM, Shona Talbot wrote:

> I don't know if this is a postgres or ogr2ogr issue, so I apologize  
> if I'm looking in the wrong place, but I recently ran into the  
> following:
> I used this command to convert a coverage to a postgis database:
> */ogr2ogr -f "PostgreSQL" -lco precision=no PG:"host=mercator  
> user=postgres dbname=tembec5" phase4b/*
> There were no error messages, but any field that contained a dash  
> ("-")in the field name had no values in the postgres db..  It wasnt  
> a big deal, I just renamed the fields in Arc, and it worked fine. I  
> only wondered if anyone else had run into this, and if there might  
> be a way to prevent it other than renaming the field(s).

More information about the postgis-users mailing list