Details Ticket 3367


Comment | Reply | Take | Open


Serial Number 3367
Subject SQL error when renaming a vector layer
Area grass6
Queue grass
Requestors werchowyna@epf.pl
Owner none
Status resolved
Last User Contact Fri Jun 24 13:28:15 2005 (3 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Fri Jul 22 15:19:55 2005 (3 yr ago)
Created Fri Jun 24 12:27:54 2005 (3 yr ago)

Transaction History Ticket 3367


Fri, Jun 24 2005 12:27:54    Request created by guest  
Subject: SQL error when renaming a vector layer

Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: cvs 21.06.2005

GRASS 6.1.cvs (caves_utm33):~ > g.rename vect=utm_km,4_utm_km
RENAME [utm_km] to [4_utm_km]
DBMI-DBF driver error:
SQL parser error in statement:
create table 4_utm_km ( cat integer, row integer, col integer )
Cannot create table

WARNING: Cannot create new table
WARNING: Cannot copy table
WARNING: Cannot rename utm_km to 4_utm_km

Is it by design? I couldn't find any information that vector layer names cannot
start with a digit.

Maciek
Fri, Jun 24 2005 12:47:01    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <33018.212.87.99.203.1119609801.squirrel@vivegnulinux.homelinux.org>
In-Reply-To <20050624102754.E9A55101FA5@lists.intevation.de>
References <20050624102754.E9A55101FA5@lists.intevation.de>
Date Fri, 24 Jun 2005 12:43:21 +0200 (CEST)
Subject Re: [GRASS5] [bug #3367] (grass) SQL error when renaming a vector layer
From "Moritz Lennert" <mlennert@club.worldonline.be>
To "Request Tracker" <grass-bugs@intevation.de>
Reply-To mlennert@club.worldonline.be
User-Agent SquirrelMail/1.4.4
MIME-Version 1.0
Content-Type text/plain;charset=iso-8859-1
Content-Transfer-Encoding 8bit
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
On Fri, June 24, 2005 12:27, Request Tracker said:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3367
> -------------------------------------------------------------------------
>
> Subject: SQL error when renaming a vector layer
>
> Platform: GNU/Linux/i386
> grass obtained from: Trento Italy site
> grass binary for platform: Compiled from Sources
> GRASS Version: cvs 21.06.2005
>
> GRASS 6.1.cvs (caves_utm33):~ > g.rename vect=utm_km,4_utm_km
> RENAME [utm_km] to [4_utm_km]
> DBMI-DBF driver error:
> SQL parser error in statement:
> create table 4_utm_km ( cat integer, row integer, col integer )
> Cannot create table
>
> WARNING: Cannot create new table
> WARNING: Cannot copy table
> WARNING: Cannot rename utm_km to 4_utm_km
>
> Is it by design? I couldn't find any information that vector layer names
> cannot start with a digit.
>

See http://grass.itc.it/grass60/manuals/html60_user/sql.html under "NOTES":

#  Supported table name characters are only:
[A-Za-z][A-Za-z0-9_]*
# A table name must start with a character, not a number.

Moritz


Fri, Jun 24 2005 13:28:15    Mail sent by morten@untamo.net  
Return-Path <morten@untamo.net>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <42BBEE3F.6040407@untamo.net>
Date Fri, 24 Jun 2005 13:27:59 +0200
From Morten Hulden <morten@untamo.net>
User-Agent Mozilla Thunderbird 1.0.2-1.3.3 (X11/20050513)
X-Accept-Language en-us, en
MIME-Version 1.0
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #3367] (grass) SQL error when renaming a vector layer
References <20050624102754.E9A55101FA5@lists.intevation.de>
In-Reply-To <20050624102754.E9A55101FA5@lists.intevation.de>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Request Tracker wrote:

> GRASS 6.1.cvs (caves_utm33):~ > g.rename vect=utm_km,4_utm_km
> RENAME [utm_km] to [4_utm_km]
> DBMI-DBF driver error:
> SQL parser error in statement:
> create table 4_utm_km ( cat integer, row integer, col integer )
> Cannot create table
> 
> WARNING: Cannot create new table
> WARNING: Cannot copy table
> WARNING: Cannot rename utm_km to 4_utm_km
> 
> Is it by design? I couldn't find any information that vector layer names cannot
start with a digit.

A dbf/psql restriction and should not be reported as a Grass bug


Fri, Jun 24 2005 22:53:40    Mail sent by werchowyna@epf.pl  
Return-Path <werchowyna@epf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <00a901c578fe$c447e700$50d21d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@epf.pl>
To "Morten Hulden" <morten@untamo.net>, "Request Tracker" <grass-bugs@intevation.de>
Cc "grass devel" <grass5@grass.itc.it>
References <20050624102754.E9A55101FA5@lists.intevation.de> <42BBEE3F.6040407@untamo.net>
Subject Re: [GRASS5] [bug #3367] (grass) SQL error when renaming a vector layer
Date Fri, 24 Jun 2005 22:48:26 +0200
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding 7bit
X-Priority 3
X-MSMail-Priority Normal
X-Mailer Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus avast! (VPS 0524-1, 2005-06-14), Outbound message
X-Antivirus-Status Clean
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
From: "Morten Hulden" <morten@untamo.net>

> Request Tracker wrote:
>
>> GRASS 6.1.cvs (caves_utm33):~ > g.rename vect=utm_km,4_utm_km
>> RENAME [utm_km] to [4_utm_km]
>> DBMI-DBF driver error:
>> SQL parser error in statement:
>> create table 4_utm_km ( cat integer, row integer, col integer )
>> Cannot create table
>>
>> WARNING: Cannot create new table
>> WARNING: Cannot copy table
>> WARNING: Cannot rename utm_km to 4_utm_km
>>
>> Is it by design? I couldn't find any information that vector layer names
>> cannot start with a digit.
>
> A dbf/psql restriction and should not be reported as a Grass bug

OK. Anyway - why is g.rename trying to rename to "4_utm_km" and actually
*does it* if such name is not supported due to dbf driver limitations? No
logic. There should be an appropriate check and blocking for such actions
folowed by an information about the restriction involved - like in some v.*
modules (say v.mkgrid).

Are there more modules which do not verify the resulting vector layer name 
according to dbf/psql restrictions?

Maciek


Fri, Jul 22 2005 15:15:23    Status changed to resolved by msieczka  
Fri, Jul 22 2005 15:19:55    Comments added by msieczka  
closing this one to avoid confussion
new wish created instead: "g.rename and g.copy should verify vector file names
for SQL compliance"
Comment | Reply | Take | Open

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