[GRASS5] Re: [bug #3368] (grass) v.db.addcol manual - what column

Moritz Lennert mlennert at club.worldonline.be
Wed Jun 29 08:57:31 EDT 2005


-----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-----




More information about the grass-dev mailing list