[GRASS5] [bug #3184] (grass) db.execute: create, add: catch names too long

this bug's URL: http://intevation.de/rt/webrt?serial_num=3184
-------------------------------------------------------------------------

  $ echo 'create table zz (cat int, axis int, contour int, \
  x double, y double, segmentlength double, linelength double)'|db.execute
This should be caught that segmentlength is too long a name, and exit $?=1.

P.S, no matter what I click in d.path, it will not let me proceed from
choosing "from":
$ d.path z6
L: from M: to R: quit
Node 4: 233530.038151 2680135.141840
Node 1: 233016.843750 2679852.947917
Node 4: 233530.038151 2680135.141840

On http://grass.itc.it/grass57/tutorial/network.html, it says:
"Reachability of Schools (find better name)".
Maybe use 'Distance bands from selected schools'.

I had to use cat \> 1 in this makefile, else v.iso.net Segmentation faults:
roads:
      echo CREATE TABLE $@ \(cat int,fare double,distance \
      double\)|db.execute
      v.db.connect map=b8 table=$@
      v.to.db map=b8 option=cat
# echo UPDATE $@ SET fare=300|db.execute #except axis
      echo UPDATE $@ SET fare=300 where cat \> 1|db.execute
iso:
  v.net.iso input=b8 output=$@ ccats=1 \
  costs=$$(seq -s, 100 100 2000) afcolumn=fare

--- Headers Follow ---

From jidanni@jidanni.org Tue Apr 26 00:29:36 2005

Return-Path: <jidanni@jidanni.org>
Delivered-To: grass-bugs@lists.intevation.de
Received: from mail.intevation.de (aktaia [212.95.126.10])
  by lists.intevation.de (Postfix) with ESMTP id 3707C1005BA
  for <grass-bugs@lists.intevation.de>; Tue, 26 Apr 2005 00:29:36 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
  by mail.intevation.de (Postfix) with ESMTP id CB87F36CDC
  for <grass-bugs@lists.intevation.de>; Tue, 26 Apr 2005 00:29:35 +0200 (CEST)
Received: from frodo.hserus.net (frodo.hserus.net [204.74.68.40])
  by mail.intevation.de (Postfix) with ESMTP id 2867136CDB
  for <grass-bugs@intevation.de>; Tue, 26 Apr 2005 00:29:35 +0200 (CEST)
Received: from tc218-187-78-84.2-4.dynamic.apol.com.tw ([218.187.78.84]:32883 helo=jidanni1)
  by frodo.hserus.net with esmtpsa
  (Cipher TLSv1:AES256-SHA:256) (Exim 4.50 #1)
  id 1DQC4z-000J9r-JR by authid <jidanni> with plain
  for <grass-bugs@intevation.de>; Tue, 26 Apr 2005 03:59:32 +0530
To: grass-bugs@intevation.de
Subject: db.execute: create, add: catch names too long
From: Dan Jacobson <jidanni@jidanni.org>
Date: Tue, 26 Apr 2005 01:21:37 +0800
Message-ID: <87fyxe3h7i.fsf@jidanni.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Status: No, hits=-4.5 tagged_above=-999.0 required=3.0 tests=BAYES_00,
  DATE_IN_PAST_03_06
X-Spam-Level:

-------------------------------------------- Managed by Request Tracker

this bug's URL: http://intevation.de/rt/webrt?serial_num=3184
---------------------------------------------------------------------

  $ echo 'create table zz (cat int, axis int, contour int, \
  x double, y double, segmentlength double, linelength
  double)'|db.execute
This should be caught that segmentlength is too long a name, and exit
$?=1.

That is it is too long for the DBF driver, as DBF column names may only
be 10 chars, as documented in the GRASS SQL help page. Other DBs may be
fine with it(?).

Hamish