Details Ticket 3368


Comment | Reply | Take | Open


Serial Number 3368
Subject v.db.addcol manual - what column types?
Area wish6
Queue grass
Requestors werchowyna@epf.pl
Owner none
Status resolved
Last User Contact Sun Jul 24 16:15:17 2005 (3 yr ago)
Current Priority 70
Final Priority 70
Due No date assigned
Last Action Sun Jul 24 20:50:22 2005 (3 yr ago)
Created Fri Jun 24 13:26:29 2005 (3 yr ago)

Transaction History Ticket 3368


Fri, Jun 24 2005 13:26:29    Request created by guest  
Subject: v.db.addcol manual - what column types?

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

columns=string
name and type of the new columns (ex: col1 type1, col2 type2)

is not informative. I still can't create new columns because I don't know what
are the types allowed and how to input them here. I bet not only me. So a short
note what data types are recognized by Grass and how to call them would do much
help. Or maybe that could go to "sql notes"?

Thanks
Maciek
Fri, Jun 24 2005 14:12:29    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <33387.212.87.99.203.1119614932.squirrel@vivegnulinux.homelinux.org>
In-Reply-To <20050624112629.56C9F1006AD@lists.intevation.de>
References <20050624112629.56C9F1006AD@lists.intevation.de>
Date Fri, 24 Jun 2005 14:08:52 +0200 (CEST)
Subject Re: [GRASS5] [bug #3368] (grass) v.db.addcol manual - what column types?
From "Moritz Lennert" <mlennert@club.worldonline.be>
To "Request Tracker" <grass-bugs@intevation.de>
Cc radim.blazek@gmail.com
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 13:26, Request Tracker said:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3368
> -------------------------------------------------------------------------
>
> Subject: v.db.addcol manual - what column types?
>
> Platform: GNU/Linux/i386
> grass obtained from: Trento Italy site
> grass binary for platform: Compiled from Sources
> GRASS Version: cvs 21.06.2005
>
> columns=string
> name and type of the new columns (ex: col1 type1, col2 type2)
>
> is not informative. I still can't create new columns because I don't know what
> are the types allowed and how to input them here. I bet not only me. So a
> short note what data types are recognized by Grass and how to call them would
> do much help. Or maybe that could go to "sql notes"?

I agree that this should be documented.

Radim, are all types supported by the respective backends supported by GRASS
?
If that is the case we could at least insert links to the different backend's
websites...

Moritz


Fri, Jun 24 2005 15:13:58    Mail sent by radim.blazek@gmail.com  
Return-Path <radim.blazek@gmail.com>
Delivered-To grass-bugs@lists.intevation.de
DomainKey-Signature a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XiKXPzObPCKAbQkd0X/Ij9shdo3vUIuUp16ZPLKQfzXHXhrSZ1ohfSohVsglupXWtbI35924i9XbHEIIkb6Kz+PQJ4xLMV2fCDWaF6LDTgeUJe9hBzsQYi1j9aMXuckJWC2+HECSayBk8YExA7ITb52JJKtENtq+/o/Xt/95Mqc=
Message-ID <340505ef05062406131aac7af0@mail.gmail.com>
Date Fri, 24 Jun 2005 15:13:51 +0200
From Radim Blazek <radim.blazek@gmail.com>
Reply-To Radim Blazek <radim.blazek@gmail.com>
To mlennert@club.worldonline.be
Subject Re: [GRASS5] [bug #3368] (grass) v.db.addcol manual - what column types?
Cc Request Tracker <grass-bugs@intevation.de>
In-Reply-To <33387.212.87.99.203.1119614932.squirrel@vivegnulinux.homelinux.org>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Content-Disposition inline
References <20050624112629.56C9F1006AD@lists.intevation.de> <33387.212.87.99.203.1119614932.squirrel@vivegnulinux.homelinux.org>
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
On 6/24/05, Moritz Lennert <mlennert@club.worldonline.be> wrote:
> On Fri, June 24, 2005 13:26, Request Tracker said:
> > this bug's URL: http://intevation.de/rt/webrt?serial_num=3D3368
> > -----------------------------------------------------------------------=
--
> >
> > Subject: v.db.addcol manual - what column types?
> >
> > Platform: GNU/Linux/i386
> > grass obtained from: Trento Italy site
> > grass binary for platform: Compiled from Sources
> > GRASS Version: cvs 21.06.2005
> >
> > columns=3Dstring
> > name and type of the new columns (ex: col1 type1, col2 type2)
> >
> > is not informative. I still can't create new columns because I don't kn=
ow what
> > are the types allowed and how to input them here. I bet not only me. So=
a
> > short note what data types are recognized by Grass and how to call them=
would
> > do much help. Or maybe that could go to "sql notes"?
>=20
> I agree that this should be documented.
>=20
> Radim, are all types supported by the respective backends supported by GR=
ASS ?
> If that is the case we could at least insert links to the different backe=
nd's
> websites...
>=20
> Moritz

The types depend on database which is used.

Radim


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 <00aa01c578fe$c703aba0$50d21d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@epf.pl>
To "Request Tracker" <grass-bugs@intevation.de>
Cc "grass devel" <grass5@grass.itc.it>, "Radim Blazek" <radim.blazek@gmail.com>, "Moritz Lennert" <mlennert@club.worldonline.be>
References <20050624121229.CB3E2101FAF@lists.intevation.de>
Subject Re: [bug #3368] (grass) v.db.addcol manual - what column
Date Fri, 24 Jun 2005 22:49:28 +0200
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-2"; 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
>> this bug's URL: http://intevation.de/rt/webrt?serial_num=3368
>> Subject: v.db.addcol manual - what column types?
>>
>> Platform: GNU/Linux/i386
>> grass obtained from: Trento Italy site
>> grass binary for platform: Compiled from Sources
>> GRASS Version: cvs 21.06.2005
>>
>> columns=string
>> name and type of the new columns (ex: col1 type1, col2 type2)
>>
>> is not informative. I still can't create new columns because I don't know
>> what
>> are the types allowed and how to input them here. I bet not only me. So a
>> short note what data types are recognized by Grass and how to call them
>> would
>> do much help. Or maybe that could go to "sql notes"?

L Moritz  Lenert
L I agree that this should be documented.
L Radim, are all types supported by the respective backends supported by
GRASS ?
L If that is the case we could at least insert links to the different
backend's
L websites...
L Moritz

B - Radim Blazek
B The types depend on database which is used.

Facts
1 dbf is a default database driver in Grass, which means that it is most
likely to be used

2 it is almost sure that a Grass newbie will first use the dbf

3 dbf-based examples are most common in Grass manuals (14 manuals,
postgres -10)

4 dbf is the only driver mentioned in "sqlnotes"

... yet the user who wants to start using dbf driver is not informed what
kind of data types are supported.

4 Shapefile, which uses dbf, is widely used for data exchange. In particular
a Grass newbie who is migrating his data from other GIS is very likely to
use Shapefile. Thus the likelyhood of dbf-related problems and doubts
increases.

5 Could we assume that if somebody is using psql or other advanced database
then he automatically knows enough about it all so that he doesn't have such
basic problems? If so, we could conclude that such a basic guiding is only
needed for dbmi amateurs (like me), who are using the default dbf driver.

Maciek


Mon, Jun 27 2005 09:52:57    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <42BFB04E.4090504@club.worldonline.be>
Date Mon, 27 Jun 2005 09:52:46 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Debian Thunderbird 1.0.2 (X11/20050331)
X-Accept-Language en-us, en
MIME-Version 1.0
To Maciek Sieczka <werchowyna@epf.pl>
Cc Request Tracker <grass-bugs@intevation.de>, grass devel <grass5@grass.itc.it>, Radim Blazek <radim.blazek@gmail.com>
Subject Re: [GRASS5] Re: [bug #3368] (grass) v.db.addcol manual - what column
References <20050624121229.CB3E2101FAF@lists.intevation.de> <00aa01c578fe$c703aba0$50d21d3e@eustahiush>
In-Reply-To <00aa01c578fe$c703aba0$50d21d3e@eustahiush>
X-Enigmail-Version 0.91.0.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Maciek Sieczka wrote:
>>> this bug's URL: http://intevation.de/rt/webrt?serial_num=3368
>>> Subject: v.db.addcol manual - what column types?
>>>
>>> Platform: GNU/Linux/i386
>>> grass obtained from: Trento Italy site
>>> grass binary for platform: Compiled from Sources
>>> GRASS Version: cvs 21.06.2005
>>>
>>> columns=string
>>> name and type of the new columns (ex: col1 type1, col2 type2)
>>>
>>> is not informative. I still can't create new columns because I don't
>>> know
>>> what
>>> are the types allowed and how to input them here. I bet not only me.
>>> So a
>>> short note what data types are recognized by Grass and how to call them
>>> would
>>> do much help. Or maybe that could go to "sql notes"?
> 
> 
> L Moritz  Lenert
> L I agree that this should be documented.
> L Radim, are all types supported by the respective backends supported by
> GRASS ?
> L If that is the case we could at least insert links to the different
> backend's
> L websites...
> L Moritz
> 
> B - Radim Blazek
> B The types depend on database which is used.
> 
> Facts
> 1 dbf is a default database driver in Grass, which means that it is most
> likely to be used
> 
> 2 it is almost sure that a Grass newbie will first use the dbf
> 
> 3 dbf-based examples are most common in Grass manuals (14 manuals,
> postgres -10)
> 
> 4 dbf is the only driver mentioned in "sqlnotes"
> 
> ... yet the user who wants to start using dbf driver is not informed what
> kind of data types are supported.
> 
> 4 Shapefile, which uses dbf, is widely used for data exchange. In
> particular
> a Grass newbie who is migrating his data from other GIS is very likely to
> use Shapefile. Thus the likelyhood of dbf-related problems and doubts
> increases.
> 
> 5 Could we assume that if somebody is using psql or other advanced database
> then he automatically knows enough about it all so that he doesn't have
> such
> basic problems? If so, we could conclude that such a basic guiding is only
> needed for dbmi amateurs (like me), who are using the default dbf driver.
> 

I agree. Radim could you list the available types in the dbf driver,
or give me a pointer where I can find them, so that I can add the
list to the man page (and maybe even to the module itself) ?

Moritz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCv7BOrIrMbm76jD8RAtoCAJ9+6nKeVtwnnX7iYwVTPV50ZwmGMQCffPxi
wbL3MiN/ImfDGdOoKn4+EuA=
=GDtB
-----END PGP SIGNATURE-----


Mon, Jun 27 2005 12:07:14    Mail sent by glynn@gclements.plus.com  
Return-Path <glynn@gclements.plus.com>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn@gclements.plus.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <17087.53148.773901.785170@gargle.gargle.HOWL>
Date Mon, 27 Jun 2005 11:06:20 +0100
To Moritz Lennert <mlennert@club.worldonline.be>
Cc Maciek Sieczka <werchowyna@epf.pl>, Request Tracker <grass-bugs@intevation.de>, grass devel <grass5@grass.itc.it>, Radim Blazek <radim.blazek@gmail.com>
Subject Re: [GRASS5] Re: [bug #3368] (grass) v.db.addcol manual - what column
In-Reply-To <42BFB04E.4090504@club.worldonline.be>
References <20050624121229.CB3E2101FAF@lists.intevation.de> <00aa01c578fe$c703aba0$50d21d3e@eustahiush> <42BFB04E.4090504@club.worldonline.be>
X-Mailer VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00, UPPERCASE_25_50
X-Spam-Level
Moritz Lennert wrote:

> I agree. Radim could you list the available types in the dbf driver,
> or give me a pointer where I can find them, so that I can add the
> list to the man page (and maybe even to the module itself) ?

The allowable column types are VARCHAR, INT, DOUBLE and DATE.

The clauses for parsing a CREATE TABLE statement are in
lib/db/sqlp/yac.y:

y_create:
		CREATE TABLE y_table '(' y_columndefs ')'	{ sqpCommand(SQLP_CREATE); }
	;
	
y_columndefs:
		y_columndef
	|	y_columndefs ',' y_columndef
	;

y_columndef:
		NAME VARCHAR '(' INTNUM ')'	{ sqpColumnDef( $1, SQLP_VARCHAR, $4, 0 ); }
	|	NAME INT 			{ sqpColumnDef( $1, SQLP_INTEGER,  0, 0 ); }
	|	NAME INTEGER 			{ sqpColumnDef( $1, SQLP_INTEGER,  0, 0 ); }
	|	NAME DOUBLE			{ sqpColumnDef( $1, SQLP_DOUBLE,   0, 0 ); }
	|	NAME DOUBLE PRECISION		{ sqpColumnDef( $1, SQLP_DOUBLE,   0, 0 ); }
	|	NAME DATE			{ sqpColumnDef( $1, SQLP_DATE,     0, 0 ); }
	;

-- 
Glynn Clements <glynn@gclements.plus.com>


Wed, Jun 29 2005 14:59:42    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <42C29ABB.9080306@club.worldonline.be>
Date Wed, 29 Jun 2005 14:57:31 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Debian Thunderbird 1.0.2 (X11/20050331)
X-Accept-Language en-us, en
MIME-Version 1.0
To Glynn Clements <glynn@gclements.plus.com>
Cc Maciek Sieczka <werchowyna@epf.pl>, Request Tracker <grass-bugs@intevation.de>, grass devel <grass5@grass.itc.it>, Radim Blazek <radim.blazek@gmail.com>
Subject Re: [GRASS5] Re: [bug #3368] (grass) v.db.addcol manual - what column
References <20050624121229.CB3E2101FAF@lists.intevation.de> <00aa01c578fe$c703aba0$50d21d3e@eustahiush> <42BFB04E.4090504@club.worldonline.be> <17087.53148.773901.785170@gargle.gargle.HOWL>
In-Reply-To <17087.53148.773901.785170@gargle.gargle.HOWL>
X-Enigmail-Version 0.91.0.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00, UPPERCASE_25_50
X-Spam-Level
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Glynn Clements wrote:
> Moritz Lennert wrote:
> 
> 
>>I agree. Radim could you list the available types in the dbf driver,
>>or give me a pointer where I can find them, so that I can add the
>>list to the man page (and maybe even to the module itself) ?
> 
> 
> The allowable column types are VARCHAR, INT, DOUBLE and DATE.

I suppose that these types exist in all backends, and so can be
considered as the minimum available ?

Moritz


> 
> The clauses for parsing a CREATE TABLE statement are in
> lib/db/sqlp/yac.y:
> 
> y_create:
> 		CREATE TABLE y_table '(' y_columndefs ')'	{ sqpCommand(SQLP_CREATE); }
> 	;
> 	
> y_columndefs:
> 		y_columndef
> 	|	y_columndefs ',' y_columndef
> 	;
> 
> y_columndef:
> 		NAME VARCHAR '(' INTNUM ')'	{ sqpColumnDef( $1, SQLP_VARCHAR, $4, 0 ); }
> 	|	NAME INT 			{ sqpColumnDef( $1, SQLP_INTEGER,  0, 0 ); }
> 	|	NAME INTEGER 			{ sqpColumnDef( $1, SQLP_INTEGER,  0, 0 ); }
> 	|	NAME DOUBLE			{ sqpColumnDef( $1, SQLP_DOUBLE,   0, 0 ); }
> 	|	NAME DOUBLE PRECISION		{ sqpColumnDef( $1, SQLP_DOUBLE,   0, 0 ); }
> 	|	NAME DATE			{ sqpColumnDef( $1, SQLP_DATE,     0, 0 ); }
> 	;
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCwpq6rIrMbm76jD8RAs9/AJwLd68l5hX5sML1E2XDMupMdQxxRwCfedPn
9oS20q4OOcN/PRqSHh6BMTM=
=RM8z
-----END PGP SIGNATURE-----


Fri, Jul 22 2005 14:31:26    Mail sent by msieczka  
Hi Moritz

How is this one going? :)

Maciek
Sun, Jul 24 2005 16:15:17    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <33344.212.87.111.29.1122214249.squirrel@vivegnulinux.homelinux.org>
In-Reply-To <20050722123126.26A791005A0@lists.intevation.de>
References <20050722123126.26A791005A0@lists.intevation.de>
Date Sun, 24 Jul 2005 16:10:49 +0200 (CEST)
Subject Re: [bug #3368] (grass) v.db.addcol manual - what column types?
From "Moritz Lennert" <mlennert@club.worldonline.be>
To "Maciek Sieczka via RT" <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
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, July 22, 2005 14:31, Maciek Sieczka via RT said:
> Hi Moritz
>
>
>
> How is this one going? :)

Just added hints to four basic supported types (VARCHAR, INT, DOUBLE and DATE)
to CVS.

Moritz


Sun, Jul 24 2005 20:49:14    Mail sent by werchowyna@epf.pl  
Return-Path <werchowyna@epf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <021501c59080$4e8f3970$8be41d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@epf.pl>
To <mlennert@club.worldonline.be>, "Maciek Sieczka via RT" <grass-bugs@intevation.de>
Cc <grass5@grass.itc.it>
References <20050722123126.26A791005A0@lists.intevation.de> <33344.212.87.111.29.1122214249.squirrel@vivegnulinux.homelinux.org>
Subject Re: [GRASS5] Re: [bug #3368] (grass) v.db.addcol manual - what column types?
Date Sun, 24 Jul 2005 19:57:53 +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 0528-4, 2005-07-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: "Moritz Lennert" <mlennert@club.worldonline.be>
> Just added hints to four basic supported types (VARCHAR, INT, DOUBLE and 
> DATE)
> to CVS.

That's cool Moritz, I think this will really be some help for newbies.

Cheers
Maciek 


Sun, Jul 24 2005 20:50:22    Status changed to resolved by msieczka  
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