[GRASS-SVN] r51982 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 6 03:52:12 PDT 2012
Author: martinl
Date: 2012-06-06 03:52:11 -0700 (Wed, 06 Jun 2012)
New Revision: 51982
Modified:
grass/trunk/lib/vector/Vlib/open.c
Log:
vlib/pg: define new default values for PG-links (fid and geometry column)
Modified: grass/trunk/lib/vector/Vlib/open.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open.c 2012-06-06 10:12:08 UTC (rev 51981)
+++ grass/trunk/lib/vector/Vlib/open.c 2012-06-06 10:52:11 UTC (rev 51982)
@@ -25,6 +25,10 @@
#include <grass/vector.h>
#include <grass/glocale.h>
+/* PG-related defines */
+#define FID_COLUMN "fid"
+#define GEOMETRY_COLUMN "geom"
+
/*
\brief Number of levels
@@ -808,7 +812,7 @@
if (p)
pg_info->fid_column = G_store(p);
else
- pg_info->fid_column = G_store("ogc_fid");
+ pg_info->fid_column = G_store(FID_COLUMN);
G_debug(1, "PG: fid_column = '%s'", pg_info->fid_column);
/* geometry column (default: wkb_geometry) */
@@ -816,7 +820,7 @@
if (p)
pg_info->geom_column = G_store(p);
else
- pg_info->geom_column = G_store("wkb_geometry");
+ pg_info->geom_column = G_store(GEOMETRY_COLUMN);
G_debug(1, "PG: geom_column = '%s'", pg_info->geom_column);
/* table name */
More information about the grass-commit
mailing list