Opened 16 months ago

Last modified 15 months ago

#3602 new enhancement

Quick Database Switcher

Reported by: pshapley Owned by: grass-dev@…
Priority: normal Milestone:
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 (3)

comment:1 in reply to:  description Changed 16 months ago by mmetz

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 Changed 15 months ago 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.

comment:3 in reply to:  2 Changed 15 months ago by mmetz

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.

Note: See TracTickets for help on using tickets.