[GRASS-dev] db.execute segfaults on simplest SQL query

Maciej Sieczka tutey at o2.pl
Mon Oct 8 16:32:00 EDT 2007


Moritz Lennert wrote:
> On Mon, October 8, 2007 22:08, Maciej Sieczka wrote:
>> This works:
>>
>> $ v.db.select pts_out col=rast_val
>> rast_val
>> 108.3656
>> 102.906
>> 41.60993
>>
>> but, it's SQL counterpart segfaults:
>>
>> $ echo "SELECT rast_val FROM pts_out" | db.execute
>> Segmentation fault
>> dbmi: Protocol error
>> ERROR: Error while executing: 'SELECT rast_val FROM pts_out
>>        '

> All select queries need to be sent via db.select. All other queries via
> db.execute. I.e. try
> 
> $ echo "SELECT rast_val FROM pts_out" | db.select

Yes, perfect. Sorry for false alarm.

Anyway, if db.execute could not segfault and say something
instructive it would be great. Eg.:

"db.execute does not support SELECT queries. Use db.select
instead."

Maciek




More information about the grass-dev mailing list