[GRASS-user] v.db.join error

Patrick_schirmer patrick_GIS at gmx.ch
Fri Dec 3 02:53:00 EST 2010


Thanks Micha,

Yes, commands are what I typed, just renamed the filenames before 
sending mail to the list:
x_arbeit = x_last
x_wohn = x_current

/That syntax is an error in postgres: double precision does not take a 
length qualifier.
There's nothing in the v.db.join script that I can find that would add 
such a thing./"

Is it a problem of postgres or of v.db.addcolumn which is called within 
v.db.join? Can someone reproduce this mistake?

Cheers, Patrick



On 12/01/2010 08:48 PM, Micha Silver wrote:
> Hi Patrick
>
> On 12/01/2010 05:29 PM, Patrick_schirmer wrote:
>> Hi, me again :-/
>>
>> I got two vectorfiles with points - one file representing the 
>> current  location of persons and the other one representing previous 
>> locations of the same persons. Persons are unique and have an id 
>> which is present in both files. I would like to calculate the 
>> distance each person has moved. Thought it would be best doing this 
>> in the datbase.
>>
>> _my approach:_
>> v.db.addcolumn map=GR_xy_current col="x_current double precision, 
>> y_current double precision, distance double precision"
>> v.db.addcolumn map=GR_xy_last col="x_last double precision, y_last 
>> double precision"
>> v.to.db map=GR_xy_current option=coor col=x_current,y_current
>> v.to.db map=GR_xy_last option=coor col=x_last,y_last
>> v.db.join map=GR_xy_current column=id otable=GR_xy_last ocolumn=id
>>
>> _All commands will run except the last one, creating this error:_
>>
>> DBMI-Postgres driver error:
>> Cannot execute:
>> ALTER TABLE GR_xy_current ADD COLUMN x_arbeit DOUBLE PRECISION(8)
>> ERROR:  syntax error at or near "("
>> LINE 1: ... TABLE GR_xy_current ADD COLUMN x_arbeit DOUBLE PRECISION(8)
>>                                                                       
>>                                                           ^
>    ERROR: Error while executing: 'ALTER TABLE GR_xy_current ADD COLUMN
>>        x_last DOUBLE PRECISION(8)'
>> ERROR: Unable to add column <x_last DOUBLE PRECISION(8)>.
>> ERROR: Error creating column <x_last>.
>>
>>
>> datbase: PG; Grass-version 7.0
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20101203/d0f5ce12/attachment.html


More information about the grass-user mailing list