[GRASS-dev] [GRASS GIS] #3602: Quick Database Switcher

#3602: Quick Database Switcher
-------------------------+-------------------------
Reporter: pshapley | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Database | Version: 7.4.0
Keywords: | CPU: x86-64
Platform: All |
-------------------------+-------------------------
It would be useful to have a 'switcher' between the default sqlite and
other database tables such as PostgreSQL/PostGIS (on the fly) rather than
having to re-connect each time you move from one to the other. A
particular problem for example is having sqlite as default database while
wanting to export with 'v.out.postgis'

To take care of re-entering database connection configuration of
'db.connect' and 'dblogin' it also seems impossible to reset 'schema' and
'group' without opening the 'VAR' file and manually removing them each
time you swap databases. A simpler solution needed.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3602&gt;
GRASS GIS <https://grass.osgeo.org>

#3602: Quick Database Switcher
--------------------------+-------------------------
  Reporter: pshapley | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone:
Component: Database | Version: 7.4.0
Resolution: | Keywords:
       CPU: x86-64 | Platform: All
--------------------------+-------------------------

Comment (by mmetz):

Replying to [ticket:3602 pshapley]:
Part 2:
>
> To take care of re-entering database connection configuration of
'db.connect' and 'dblogin' it also seems impossible to reset 'schema' and
'group' without opening the 'VAR' file and manually removing them each
time you swap databases. A simpler solution needed.

has been solved with #3601

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3602#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3602: Quick Database Switcher
--------------------------+-------------------------
  Reporter: pshapley | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone:
Component: Database | Version: 7.4.0
Resolution: | Keywords:
       CPU: x86-64 | Platform: All
--------------------------+-------------------------

Comment (by mlennert):

Markus has answered and solved the specific schema + group issues, but
from the OP it sounds as if one needs to change db.connect settings for
the use of v.out.postgis. AFAICT, this is not the case: there is no need
to mess with db.connect to use v.out.postgis. If this were the case, I
would consider this as a bug, as these settings should only determine
default attribute backend settings in a mapset.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3602#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3602: Quick Database Switcher
--------------------------+-------------------------
  Reporter: pshapley | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone:
Component: Database | Version: 7.4.0
Resolution: | Keywords:
       CPU: x86-64 | Platform: All
--------------------------+-------------------------

Comment (by mmetz):

Replying to [comment:2 mlennert]:
> Markus has answered and solved the specific schema + group issues, but
from the OP it sounds as if one needs to change db.connect settings for
the use of v.out.postgis. AFAICT, this is not the case: there is no need
to mess with db.connect to use v.out.postgis. If this were the case, I
would consider this as a bug, as these settings should only determine
default attribute backend settings in a mapset.

There is a bug in v.out.postgis: it does not copy tables from input to
output, it copies only dblinks from input to output which only works if
input (GRASS) and output (PostGIS) use the same driver and database for
attributes. In theory this could be easily fixed by copying tables.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3602#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>