Opened 6 years ago

Last modified 5 years ago

#3602 new enhancement

Quick Database Switcher

Reported by: pshapley Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Database Version: 7.4.0
Keywords: Cc:
CPU: x86-64 Platform: All

Description

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.

Change History (4)

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

Replying to 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

comment:2 by mlennert, 6 years ago

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.

in reply to:  2 comment:3 by mmetz, 6 years ago

Replying to 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.

comment:4 by neteler, 5 years ago

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