Cheers Richard! Your two suggestions fixed the problem. Here is the resultant working command:<br>  <br>  ogr2ogr -f KML kmltest.kml "PG:dbname=postgis user=postgres password=pword host=localhost" -sql "SELECT * FROM district;"<br>  <br>  Brent Edwards<br>  Montreal, QC<br>  <br>  <br><br><b><i>Richard Matsunaga &lt;richard.matsunaga@waypointinfo.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">      <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">  <meta content="MSHTML 6.00.5730.11" name="GENERATOR">  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"><span class="481141221-03012007">Try 'user=postgres' instead. You may need a 'host=' in   there as well.</span></font></div>  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"><span class="481141221-03012007"></span></font>&nbsp;</div>  <div align="left" dir="ltr"><font
 color="#0000ff" face="Arial" size="2"><span class="481141221-03012007">Richard</span></font></div><br>  <div class="OutlookMessageHeader" align="left" dir="ltr" lang="en-us">  <hr tabindex="-1">  <font face="Tahoma" size="2"><b>From:</b> gdal-dev-bounces@lists.maptools.org   [mailto:gdal-dev-bounces@lists.maptools.org] <b>On Behalf Of </b>Brent   Edwards<br><b>Sent:</b> January 3, 2007 3:16 PM<br><b>To:</b>   gdal-dev@lists.maptools.org<br><b>Subject:</b> [Gdal-dev] Newbie queston   concerning ogr2ogr for PostgreSQL<br></font><br></div>  <div></div>Why won't this work?:<br><br>ogr2ogr -f KML kmltest.kml   "PG:dbname=postg<br>is username=postgres password=pword" -sql "SELECT * FROM   district;"<br><br>ERROR 1: PQconnectdb failed.<br>invalid connection option   "username"<br><br>FAILURE:<br>Unable to open datasource `PG:dbname=postgis   username=postgres password=pword' w<br>ith the following drivers.<br>&nbsp;   -&gt; ESRI Shapefile<br>&nbsp; -&gt; MapInfo File<br>&nbsp;
 -&gt; UK   .NTF<br>&nbsp; -&gt; SDTS<br>&nbsp; -&gt; TIGER<br>&nbsp; -&gt; S57<br>&nbsp;   -&gt; DGN<br>&nbsp; -&gt; VRT<br>&nbsp; -&gt; AVCBin<br>&nbsp; -&gt;   REC<br>&nbsp; -&gt; Memory<br>&nbsp; -&gt; CSV<br>&nbsp; -&gt; GML<br>&nbsp;   -&gt; KML<br>&nbsp; -&gt; Interlis 1<br>&nbsp; -&gt; Interlis 2<br>&nbsp; -&gt;   SQLite<br>&nbsp; -&gt; ODBC<br>&nbsp; -&gt; PGeo<br>&nbsp; -&gt; OGDI<br>&nbsp;   -&gt; PostgreSQL<br>&nbsp; -&gt; MySQL<br><br>  <div>__________________________________________________<br>Do You Yahoo!?<br>Tired   of spam? Yahoo! Mail has the best spam protection around   <br>http://mail.yahoo.com </div></blockquote><br><p>&#32;__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com