[GRASS-dev] db.execute segfaults on simplest SQL query
Brad Douglas
rez at touchofmadness.com
Mon Oct 8 21:21:41 EDT 2007
On Mon, 2007-10-08 at 22:32 +0200, Maciej Sieczka wrote:
> 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."
Committed to CVS.
--
73, de Brad KB8UYR/6 <rez touchofmadness com>
More information about the grass-dev
mailing list