[GRASS-dev] [GRASS GIS] #2626: v.out.ogr does not suggest db.connect and db.login when not set
GRASS GIS
trac at osgeo.org
Mon Mar 16 10:15:45 PDT 2015
#2626: v.out.ogr does not suggest db.connect and db.login when not set
-------------------------------------------+--------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Vector | Version: svn-trunk
Keywords: PostgreSQL, postgres, PostGIS | Platform: Linux
Cpu: Unspecified |
-------------------------------------------+--------------------------------
When there is no connection set using `db.connect` or authentication using
`db.login`, `v.out.ogr` does not say what's wrong. Instead a misleading
(?) error about database creation is shown:
{{{
$ v.out.ogr in=lakes at PERMANENT output=PG:dbname=gis format=PostgreSQL
type=area
ERROR 1: PQconnectdb failed.
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
ERROR 1: PostgreSQL driver doesn't currently support database creation.
Please create database with the `createdb' command.
ERROR: Unable to open OGR data source 'PG:dbname=gis'
}}}
Executing `db.connect` and `db.login` actually does not solve the problem
for me: `db.tables -p` lists tables but `v.out.ogr` still says the same. I
suppose this might be my problem, I might have misinterpreted the manual,
but in any case the initial message is wrong.
The special thing about my environment is that I'm using PostgreSQL
database in a Docker container from
[https://registry.hub.docker.com/u/kartoza/postgis/ kartoza/postgis]. I
used their steps to run it and `psql` works for me (in GRASS session):
{{{
psql -h localhost -U docker -p 25432 -l
}}}
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2626>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list