Details Ticket 4310


Comment | Reply | Take | Resolve


Serial Number 4310
Subject db.drivers: what do the -pf actually do?
Area grass6
Queue grass
Requestors tutey@o2.pl
Owner none
Status open
Last User Contact Mon Jul 10 11:09:07 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Wed Sep 27 01:26:16 2006 (2 yr ago)
Created Wed Apr 19 15:00:57 2006 (2 yr ago)

Transaction History Ticket 4310


Wed, Apr 19 2006 15:00:57    Request created by guest  
Subject: db.drivers: what do the -pf actually do?

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
Wed, Apr 19 2006 15:14:41    Mail sent by mneteler  
Hi,

I have fixed at least the description (also in 6.0-CVS).
Maybe the -f is a residual?

Markus
Thu, Apr 20 2006 01:53:57    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 20 Apr 2006 11:53:40 +1200
From Hamish <hamish_nospam@yahoo.com>
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #4310] (grass) db.drivers: what do the -pf actually do?
Message-Id <20060420115340.3386df11.hamish_nospam@yahoo.com>
In-Reply-To <20060419130057.B371E1006B7@lists.intevation.de>
References <20060419130057.B371E1006B7@lists.intevation.de>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4310
> ---------------------------------------------------------------------
> 
> Subject: db.drivers: what do the -pf actually do?
..
> 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;



Hamish


Mon, Jul 10 2006 11:09:07    Mail sent by msieczka  
Hamish wrote:

> The module is to tell you about installed db DRIVERS not TABLES.
> It is working fine.

Hamish,

Yes it is *partially* working fine *now*, *after* Markus fix. Before it used
to refer to tables (in error) and that's one point of the bug report.

The other thing is that -f "Full output" still prints only:

$ db.drivers -f
sqlite:
dbf:
ogr:
pg:

For which you seem to have found the reason:

> AFAICT, comment is unused in GRASS 6 (???).
> see lib/db/dbmi_base/dbmscap.c

(code details in the BT)

Could that be fixed?

Cheers,
Maciek
Wed, Jul 26 2006 18:28:39    User changed to tutey@o2.pl by msieczka  
Tue, Sep 26 2006 18:36:33    Comments added by guest  
Good Luck! http://xoomer.alice.it/pik0/poker-rooms/
Tue, Sep 26 2006 22:41:11    Comments added by guest  
Cool design http://xoomer.alice.it/pik0/razz-poker/
Wed, Sep 27 2006 01:26:16    Comments added by guest  
Great work on website. <a href="http://xoomer.alice.it/pik0/rules-of-poker/">rules
of poker</a> [url=http://xoomer.alice.it/pik0/rules-of-poker/]rules of poker[/url]
http://xoomer.alice.it/pik0/rules-of-poker/
Comment | Reply | Take | Resolve

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request