Sorry I was trying to limit the bandwidth I used I figured it was
probably something really stupid and someone would just say you forgot
to XX :<;
Anyway this is a test database so it really is named mydb and I copied
the ogrinfo command from the PostgreSQL driver page for OGR. I checked
before I started to confirm that the version of gdal I'm using supports
Postgresql and the ogrinfo --formats prints -> "PostgreSQL" (read/write)
so I believe that confirms it.
so both ogrinfo -ro PG:'dbname=mydb' and ogrinfo -ro PG:"dbname='mydb'"
and ogrinfo -ro PG:"dbname='mydb' user='dbakeman' port='5432'" return
the same failure which is to print FAILURE: and a list of drivers which
again includes postgresql. I skipped the password part because I'm on a
system where I'm happy to run the ident authentication locally at least.
Here's what happens if I do psql -d mydb
\d
List of relations
Schema | Name | Type | Owner
--------+-------------------+-------+----------
public | geography_columns | view | dbakeman
public | geometry_columns | table | dbakeman
public | products_swordxml | table | dbakeman
public | pxml_points | view | dbakeman
public | spatial_ref_sys | table | dbakeman
public | sword_trap | table | dbakeman
Which is a list of the tables I've created.
Eli Adam wrote:
David,
It probably is a configuration or simple error, however, you've
not given much detail to let other people try to guess what it might
be. Kyle asked for the output of your command. Also, the exact
command (copied from terminal) may help too. I looked at the OGR
PosrgreSQL/PostGIS format page and copied this:
PG:"dbname='databasename' host='addr' port='5432' user='x' password='y'"
Could you try
ogrinfo PG:"dbname='mydb' host='localhost' port='5432' user='x' password='y'"
from the host machine?
What do you get?
PostgreSQL requires very complex quoting if you have any CAPs, do you
have any caps in the db name, table, name, fieldname, etc? With lack
of information, I'm making random guesses that may not be relevant.
I'm sure that if you provide detailed information, someone
knowledgeable will quickly help you (or at least that is what I often
observe on this list).
Bests, Eli
On Thu, Oct 13, 2011 at 5:10 PM, David J. Bakeman<[email protected]> wrote:
Mateusz Łoskot wrote:
On 13 October 2011 23:47, David J. Bakeman<[email protected]> wrote:
I'm on Fedora core 14 with gdal 1.7.3.
I setup postgre and created a spatial enabled database with a table that
includes geometry. I can connect using psql mydb. However when I try
ogrinfo -ro PG:dbname=mydb it fails saying no driver found.
ogrinfo --formats | grep -i post
-> "PostgreSQL" (read/write)
I really think it's some configuration thing but I don't know what it is?
and see if your GDAL/OGR installation has built-in PostgreSQL support.
Best regards,
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev