[GRASS-SVN] r54685 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 17 10:39:31 PST 2013
Author: martinl
Date: 2013-01-17 10:39:30 -0800 (Thu, 17 Jan 2013)
New Revision: 54685
Modified:
grass/trunk/lib/vector/Vlib/write_pg.c
Log:
vlib/pg: fix writing text-based attributes, don't use G_str_to_sql()
Modified: grass/trunk/lib/vector/Vlib/write_pg.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write_pg.c 2013-01-17 18:37:18 UTC (rev 54684)
+++ grass/trunk/lib/vector/Vlib/write_pg.c 2013-01-17 18:39:30 UTC (rev 54685)
@@ -1008,7 +1008,6 @@
int col, ncol, more;
int sqltype, ctype, is_fid;
char buf_val[DB_SQL_MAX], buf_tmp[DB_SQL_MAX];
- char *str_val;
const char *colname;
@@ -1091,10 +1090,7 @@
db_get_value_double(value));
break;
case DB_C_TYPE_STRING:
- str_val = G_store(db_get_value_string(value));
- G_str_to_sql(str_val);
- sprintf(buf_tmp, "'%s'", str_val);
- G_free(str_val);
+ sprintf(buf_tmp, "'%s'", db_get_value_string(value));
break;
case DB_C_TYPE_DATETIME:
db_convert_column_value_to_string(column,
More information about the grass-commit
mailing list