[GRASS-SVN] r73042 - grass/branches/releasebranch_7_4/vector/v.external

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 3 14:42:41 PDT 2018


Author: mmetz
Date: 2018-08-03 14:42:41 -0700 (Fri, 03 Aug 2018)
New Revision: 73042

Modified:
   grass/branches/releasebranch_7_4/vector/v.external/dsn.c
   grass/branches/releasebranch_7_4/vector/v.external/main.c
Log:
v.external: OGR dsn and GRASS db connections are independent of each other (backport trunk r72979)

Modified: grass/branches/releasebranch_7_4/vector/v.external/dsn.c
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.external/dsn.c	2018-08-03 21:23:24 UTC (rev 73041)
+++ grass/branches/releasebranch_7_4/vector/v.external/dsn.c	2018-08-03 21:42:41 UTC (rev 73042)
@@ -8,6 +8,12 @@
 {
     char *dsn;
 
+    dsn = G_store(opt_dsn);
+    
+    return dsn;
+
+    /* OGR dsn and GRASS db connections are independent of each other */
+
     if (G_strncasecmp(opt_dsn, "PG:", 3) == 0) {
         /* PostgreSQL/PostGIS */
         size_t i;

Modified: grass/branches/releasebranch_7_4/vector/v.external/main.c
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.external/main.c	2018-08-03 21:23:24 UTC (rev 73041)
+++ grass/branches/releasebranch_7_4/vector/v.external/main.c	2018-08-03 21:42:41 UTC (rev 73042)
@@ -101,8 +101,12 @@
     }
 
     dsn = NULL;
+    /* disabling GRASS-PostGIS driver:
+     *  TODO: a new fn that converts OGR dsn to PQ connection info,
+     *   ignoring current GRASS db connection */
+    use_ogr = TRUE;
     if (options.dsn->answer)
-        dsn = get_datasource_name(options.dsn->answer, use_ogr);
+        dsn = G_store(options.dsn->answer);
     
     if (flags.list->answer || flags.tlist->answer) {
         /* list layers */



More information about the grass-commit mailing list