Opened 9 years ago

Closed 5 years ago

#2626 closed defect (wontfix)

v.out.ogr does not suggest db.connect and db.login when not set

Reported by: wenzeslaus Owned by: martinl
Priority: normal Milestone: 7.2.4
Component: Vector Version: svn-trunk
Keywords: PostgreSQL, postgres, PostGIS Cc: grass-dev@…
CPU: Unspecified Platform: Linux

Description

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@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 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

Change History (11)

comment:1 by neteler, 9 years ago

Small note: The error message comes from OGR, not GRASS GIS (here a random link to a similar problem: http://lists.osgeo.org/pipermail/gdal-dev/2012-November/034530.html).

comment:2 by martinl, 9 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

comment:3 by neteler, 8 years ago

Milestone: 7.1.07.2.0

Milestone renamed

comment:4 by mlennert, 7 years ago

This seems related to the issues discussed in #3167. Is this still an issue for you in 7.2 ?

comment:5 by neteler, 7 years ago

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:6 by martinl, 7 years ago

Still the issue in GRASS 7.2.1svn?

comment:7 by martinl, 7 years ago

Milestone: 7.2.17.2.2

comment:8 by neteler, 7 years ago

Milestone: 7.2.27.2.3

Ticket retargeted after milestone closed

comment:9 by martinl, 6 years ago

Milestone: 7.2.3

Ticket retargeted after milestone closed

comment:10 by martinl, 6 years ago

Milestone: 7.2.4

comment:11 by martinl, 5 years ago

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.