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: | |
---|---|---|---|
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)
comment:1 by , 6 years ago
comment:2 by , 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:6 by , 5 years ago
Milestone: | → 7.8.3 |
---|
Replying to sbl:
The pg connection needs to be registered first with db.login
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'"