[Gdal-dev] Newbie queston concerning ogr2ogr for PostgreSQL

Brent Edwards brent_m_edwards at yahoo.com
Thu Jan 4 09:18:54 EST 2007


Cheers Richard! Your two suggestions fixed the problem. Here is the resultant working command:
  
  ogr2ogr -f KML kmltest.kml "PG:dbname=postgis user=postgres password=pword host=localhost" -sql "SELECT * FROM district;"
  
  Brent Edwards
  Montreal, QC
  
  

Richard Matsunaga <richard.matsunaga at waypointinfo.com> wrote:          Try 'user=postgres' instead. You may need a 'host=' in   there as well.
   
  Richard

    
---------------------------------
  From: gdal-dev-bounces at lists.maptools.org   [mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Brent   Edwards
Sent: January 3, 2007 3:16 PM
To:   gdal-dev at lists.maptools.org
Subject: [Gdal-dev] Newbie queston   concerning ogr2ogr for PostgreSQL


  
Why won't this work?:

ogr2ogr -f KML kmltest.kml   "PG:dbname=postg
is username=postgres password=pword" -sql "SELECT * FROM   district;"

ERROR 1: PQconnectdb failed.
invalid connection option   "username"

FAILURE:
Unable to open datasource `PG:dbname=postgis   username=postgres password=pword' w
ith the following drivers.
    -> ESRI Shapefile
  -> MapInfo File
  -> UK   .NTF
  -> SDTS
  -> TIGER
  -> S57
    -> DGN
  -> VRT
  -> AVCBin
  ->   REC
  -> Memory
  -> CSV
  -> GML
    -> KML
  -> Interlis 1
  -> Interlis 2
  ->   SQLite
  -> ODBC
  -> PGeo
  -> OGDI
    -> PostgreSQL
  -> MySQL

  __________________________________________________
Do You Yahoo!?
Tired   of spam? Yahoo! Mail has the best spam protection around   
http://mail.yahoo.com 


 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070104/099c932c/attachment.html


More information about the Gdal-dev mailing list