[GRASS-SVN] r55300 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Mar 10 10:24:17 PDT 2013
Author: martinl
Date: 2013-03-10 10:24:16 -0700 (Sun, 10 Mar 2013)
New Revision: 55300
Modified:
grass/trunk/lib/vector/Vlib/open_pg.c
Log:
vlib(pg): fix create_table() for text type
Modified: grass/trunk/lib/vector/Vlib/open_pg.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open_pg.c 2013-03-10 15:26:32 UTC (rev 55299)
+++ grass/trunk/lib/vector/Vlib/open_pg.c 2013-03-10 17:24:16 UTC (rev 55300)
@@ -704,7 +704,7 @@
if (Fi) {
/* append attributes */
- int col, ncols, sqltype, length, ctype;
+ int col, ncols, sqltype, length;
char stmt_col[DB_SQL_MAX];
const char *colname;
@@ -757,7 +757,6 @@
column = db_get_table_column(table, col);
colname = db_get_column_name(column);
sqltype = db_get_column_sqltype(column);
- ctype = db_sqltype_to_Ctype(sqltype);
length = db_get_column_length(column);
G_debug(3, "\tcolumn = %d name = %s type = %d length = %d",
@@ -772,7 +771,7 @@
/* append column */
sprintf(stmt_col, ",%s %s", colname, db_sqltype_name(sqltype));
strcat(stmt, stmt_col);
- if (ctype == DB_C_TYPE_STRING) {
+ if (sqltype == DB_SQL_TYPE_CHARACTER) {
/* length only for string columns */
sprintf(stmt_col, "(%d)", length);
strcat(stmt, stmt_col);
More information about the grass-commit
mailing list