[GRASS-dev] [GRASS GIS] #3167: db.connect: connection to remote database does not work
GRASS GIS
trac at osgeo.org
Wed Sep 28 09:50:24 PDT 2016
#3167: db.connect: connection to remote database does not work
--------------------------+-----------------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: blocker | Milestone: 7.0.5
Component: Database | Version: unspecified
Resolution: | Keywords: postgresql db.connect
CPU: Unspecified | Platform: Unspecified
--------------------------+-----------------------------------
Comment (by mlennert):
Replying to [comment:27 martinl]:
> Replying to [comment:26 mlennert]:
> > Example (after disabling the condition check mentioned above):
> >
> > {{{
> > createdb -h myRemoteServer testgrass2
> > db.connect driver=pg database=testgrass2
> > db.login host=myRemoteHost
> > db.tables -p
> > }}}
> >
> > Everything works, no tables shown. But then:
>
> OK, so it means that DB is empty, right?
Yes, the database I want to use as attribute backend.
>
> > {{{
> > D1/1: G_set_program_name(): v.in.ogr
> > D1/1: Using dsn=PG:dbname=testgrass2 host=myRemoteServer
> > ERREUR :Layer <boundary_county> not available
> > D1/1: G_set_program_name(): g.gisenv
> > }}}
>
> I do not understand - DB is empty, so why do you expect that `v.in.ogr`
will not fail?
Because my call to v.in.ogr was
{{{
v.in.ogr input="PG:dbname=testgrass" layer=boundary_county out=bc
}}}
i.e. trying to get a layer in db 'testgrass' and import it into my
GISDBASE, storing the attributes into my database testgrass2. I.e. (as you
note yourself in your next post here), v.in.ogr without a complete dsn
string (i.e. containing host, etc) will try to connect to the current
default attribute backend database, not the one you actually provide on
the command line.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3167#comment:29>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list