Opened 6 years ago

Last modified 5 years ago

#3806 new defect

db.copy: fails with pg as to_driver

Reported by: sbl Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Database Version: unspecified
Keywords: db.copy Cc:
CPU: Unspecified Platform: Linux

Description

db.copy fails to open a pg connection.

Tried syntax from the example as well as syntax as used in v.out.ogr.

Might make sense to unify the way DB connection strings are handled in different modules... As the pg driver usage in db.copyis inconsistent with e.g. v.in.ogr or v.out.ogr.

Change History (6)

in reply to:  description comment:1 by mmetz, 6 years ago

Replying to sbl:

db.copy fails to open a pg connection.

The pg connection needs to be registered first with db.login

Tried syntax from the example as well as syntax as used in v.out.ogr.

Might make sense to unify the way DB connection strings are handled in different modules... As the pg driver usage in db.copyis inconsistent with e.g. v.in.ogr or v.out.ogr.

v.[in|out].ogr use the OGR syntax which is different from the GRASS syntax. In GRASS, you only need to specify the driver and the database name, whereas in OGR you need to use a syntax like "PG:"dbname='databasename' host='addr' port='5432' user='x' password='y'"

comment:2 by sbl, 6 years ago

Thanks for the info. Will try and update the manual accordingly as it currently lacks info about the required db.login step...

It might be still worth considering to unify module syntax (e.g. using whitespace instead of comma for separating elements of the connection string) as well as using .pgpass file... Even if it is just minor cosmetics, it would help making things a bit more intuitive...

comment:3 by neteler, 5 years ago

Milestone: 7.8.07.8.1

Ticket retargeted after milestone closed

comment:4 by neteler, 5 years ago

Milestone: 7.8.17.8.2

Ticket retargeted after milestone closed

comment:5 by neteler, 5 years ago

Milestone: 7.8.2

Ticket retargeted after milestone closed

comment:6 by neteler, 5 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.