[Gdal-dev] Connect to Postgre?

Chapman, Martin MChapman at sanz.com
Fri Jun 25 16:58:44 EDT 2004


All,
 
How do I connect to a Postgre database using OGR?  In other words, how
do I put together my connection string to pass to
OGRSFDriverRegistrar::Open()?  I tried the following:
 
OGRSFDriverRegistrar::Open("PG:pghost=172.17.38.85;pguser=pbarker;pgpass
=pbarker;dbname=ew", 0);
 
but it returns a NULL dataset.  Does anyone know what I'm doing wrong?
Is Postgre support enabled in the GDAL build automatically?
 
Thanks, 
 
Martin Chapman
Cell 303-885-1936
Office 303-660-3933 x226
mchapman at sanz.com
http://www.sanz.com <http://www.sanz.com/> 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20040625/d92a1edf/attachment.html


More information about the Gdal-dev mailing list