2 #include <grass/dbmi.h>
15 case DB_SQL_TYPE_CHARACTER:
17 case DB_SQL_TYPE_NUMERIC:
19 case DB_SQL_TYPE_DECIMAL:
21 case DB_SQL_TYPE_SMALLINT:
23 case DB_SQL_TYPE_INTEGER:
25 case DB_SQL_TYPE_REAL:
27 case DB_SQL_TYPE_DOUBLE_PRECISION:
28 return "DOUBLE PRECISION";
29 case DB_SQL_TYPE_DATE:
31 case DB_SQL_TYPE_TIME:
33 case DB_SQL_TYPE_SERIAL:
35 case DB_SQL_TYPE_TEXT:
38 switch (sqltype & ~DB_DATETIME_MASK) {
39 case DB_SQL_TYPE_TIMESTAMP:
40 strcpy(buf,
"TIMESTAMP ");
42 case DB_SQL_TYPE_INTERVAL:
43 strcpy(buf,
"INTERVAL ");
65 strcat(buf,
"MINUTE");
68 strcat(buf,
"SECOND");
71 strcat(buf,
"FRACTION");
94 strcat(buf,
"MINUTE");
97 strcat(buf,
"SECOND");
100 strcat(buf,
"FRACTION");
const char * db_sqltype_name(int sqltype)
returns sqltype description
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
void db_interval_range(int sqltype, int *from, int *to)