Opened 5 years ago

Closed 7 months 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 Changed 5 years ago by neteler

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 Changed 5 years ago by martinl

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

comment:3 Changed 4 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

comment:4 Changed 3 years ago by mlennert

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

comment:5 Changed 3 years ago by neteler

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:6 Changed 3 years ago by martinl

Still the issue in GRASS 7.2.1svn?

comment:7 Changed 3 years ago by martinl

Milestone: 7.2.17.2.2

comment:8 Changed 2 years ago by neteler

Milestone: 7.2.27.2.3

Ticket retargeted after milestone closed

comment:9 Changed 20 months ago by martinl

Milestone: 7.2.3

Ticket retargeted after milestone closed

comment:10 Changed 20 months ago by martinl

Milestone: 7.2.4

comment:11 Changed 7 months ago by martinl

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