Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006-04-05
Hi!
In db.drivers there is a "-p" for "print tables and exit" [1], but it doesn't report any tables for me. Is it supposed to? I'm not sure if it is not a mistake (copy/paste form db.tables?) in help or else, but something's wrong here. Secondly, the output of "-f" [2] and "-p" [3] differs only in regard to ":" after the driver name, which also looks like if something's missing here or wrong.
[1]
$ db.drivers help
Description:
List all database drivers.
Usage:
db.drivers [-fp]
Flags:
-f Full output
-p print tables and exit
[2]
$ db.drivers -f
sqlite:
dbf:
ogr:
pg:
[3]
db.drivers -p
sqlite
dbf
ogr
pg
Maciek
-------------------------------------------- Managed by Request Tracker
In db.drivers there is a "-p" for "print tables and exit" [1], but it
doesn't report any tables for me. Is it supposed to? I'm not sure if
it is not a mistake (copy/paste form db.tables?) in help or else, but
something's wrong here. Secondly, the output of "-f" [2] and "-p" [3]
differs only in regard to ":" after the driver name, which also looks
like if something's missing here or wrong.
the output is correct,
GRASS> db.drivers -p
sqlite
dbf
ogr
pg
The module is to tell you about installed db DRIVERS not TABLES.
It is working fine.
AFAICT, comment is unused in GRASS 6 (???).
see lib/db/dbmi_base/dbmscap.c
here's the actual code:
db/base/drivers.c
for (p = list; p; p = p->next) {
fprintf(stdout, "%s", p->driverName);
if (parms.f) fprintf(stdout, ":%s", p->comment);
fprintf(stdout, "\n");
}
include/dbmi.h
typedef struct _dbmscap {
char driverName[256]; /* symbolic name for the dbms system */
char startup[256]; /* command to run the driver */
char comment[256]; /* comment field */
struct _dbmscap *next; /* linked list */
} dbDbmscap;