[GRASS-SVN] r59909 - grass/trunk/vector/v.external.out

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 23 11:58:35 PDT 2014


Author: martinl
Date: 2014-04-23 11:58:35 -0700 (Wed, 23 Apr 2014)
New Revision: 59909

Modified:
   grass/trunk/vector/v.external.out/status.c
Log:
v.external.out: print dsn for PostgreSQL format

Modified: grass/trunk/vector/v.external.out/status.c
===================================================================
--- grass/trunk/vector/v.external.out/status.c	2014-04-23 17:48:48 UTC (rev 59908)
+++ grass/trunk/vector/v.external.out/status.c	2014-04-23 18:58:35 UTC (rev 59909)
@@ -61,11 +61,16 @@
 	    G_fatal_error(_("OGR format not defined"));
     }
     else { /* PG */
+        char dsn_name[GNAME_MAX];
+        
 	/* conninfo (required) */
 	p = G_find_key_value("conninfo", key_val);
 	if (!p)
 	    G_fatal_error(_("PG connection info (conninfo) not defined"));
-        
+
+        /* print also dsn for compatibility */
+        sprintf(dsn_name, "PG:%s", p);
+        G_set_key_value("dsn", dsn_name, key_val);
         /* force format */
         print_key_value("format", "PostgreSQL", shell);
     }



More information about the grass-commit mailing list