[GRASS-user] Why v.extract produces columns of type "CHARACTER"?

maning sambale emmanuel.sambale at gmail.com
Wed Jan 14 04:19:25 EST 2009


On Wed, Jan 14, 2009 at 5:02 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Nikos Alexandris wrote:
>
>> > The columns produces by v.extract are of type "CHARACTER" and v.dissolve
>> > does not like this. It's an "old" issue. Can someone explain why it
>> > becomes CHARACTER since grass' type for strings is "varchar"?
>> >
>> > Regards, Nikos
>>
>> Sorry, wrong question - false alarm.
>>
>> Actually, the *real* question I have asked in the past but never really
>> got a reply is: why "sqlitebrowser" reports the columns as "varchar"
>> while db.describe reports (in grass-shell) the same columns to be of
>> type "CHARACTER"?
>
> GRASS' DBMI doesn't distinguish CHARACTER from CHARACTER VARYING (aka
> VARCHAR); the constant DB_SQL_TYPE_CHARACTER is used for both
> (although there is also DB_SQL_TYPE_TEXT for TEXT).
>
> Also, SQLite doesn't really have column types; it assigns types to
> individual values rather than to columns. Columns may have a type of
> SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB or SQLITE_NULL,
> but it doesn't actually require that the values' types conform to the
> type.
A bit off-topic.  Does this mean I can actually edit vector data
attributes as text even if the column is an INTEGER?
I'm using Sqlite database browser for editing.  A bit dangerous for
me.  Any other way to add checks/controls for editing mistakes?


> --
> Glynn Clements <glynn at gclements.plus.com>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------


More information about the grass-user mailing list