[GRASS-dev] DBF driver: semicolon and select troubles
Markus Neteler
neteler at itc.it
Sun Jul 1 04:55:23 EDT 2007
Glynn Clements wrote:
>
>
> Markus Neteler wrote:
>
>> Hi,
>>
>> when having a semicolon at the end of a statement, the DBF driver gives
>> an error:
>>
>> echo "select start_map, end_map, start_mp, start_off, end_mp, end_off,
>> lid from route_lrs where lcat = 1;" | db.select
>> DBMI-DBF driver error:
>> SQL parser error: syntax error, unexpected $undefined, expecting $end
>> processing ';'
>> in statement:
>> select start_map, end_map, start_mp, start_off, end_mp, end_off, lid
>> from route_lrs where lcat = 1;
>> Error in db_open_select_cursor()
>>
>> This is a problem, because other drivers seem to require it (see
>> v.lrs.label).
>>
>> Without semicolon, it works:
>> echo "select start_map, end_map, start_mp, start_off, end_mp, end_off,
>> lid from route_lrs where lcat = 1" | db.select
>> start_map|end_map|start_mp|start_off|end_mp|end_off|lid
>> 185.206836|596.743043|6|0|7|0|22
>>
>> How to enable the DBF driver to also accept the semicolon here?
>
> Untested:
>
> --- lib/db/sqlp/yac.y 4 Mar 2007 08:34:44 -0000 1.27
> +++ lib/db/sqlp/yac.y 1 Jul 2007 06:39:47 -0000
> @@ -102,6 +102,7 @@
> | y_select
> | y_update
> | y_delete
> + | y_sql ';'
> ;
>
> y_alter:
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
Excellent, works. I have added it to 6.2.2-CVS, too.
Unrelated: I get these warnings on Mandriva:
bison -y -d -v yac.y
yac.y:74.15-19: Warnung: symbol TABLE redeclared
yac.y:75.8-11: Warnung: symbol DROP redeclared
yac.y:75.13-17: Warnung: symbol TABLE redeclared
bison --version
bison (GNU Bison) 2.3
It this harmful?
Markus
--
View this message in context: http://www.nabble.com/DBF-driver%3A-semicolon-and-select-troubles-tf3994416.html#a11380125
Sent from the Grass - Dev mailing list archive at Nabble.com.
More information about the grass-dev
mailing list