[GRASS-user] GRASS64 sql 'where' statement character/array limit?

Stephen.King at noaa.gov Stephen.King at noaa.gov
Fri Oct 16 15:23:51 EDT 2009


Greetings all,

I am a new listserver member with a grass64 problem.  I am hoping somebody can help me out:

I have a batch script that uses ps.map plot to select and plot areas from a vector coverage.  The script uses the sql 'where' statement similar to this example:

SQL_STRING="ID=xxxx1 OR ID=xxxx2 OR ID=xxxx3"

ps.map output << EOF
vareas
 where $SQL_STRING
 <plot commands go here>
end
EOF

The SQL_STRING is read in from a file, and can contain more than 100 unique IDs.

This works great, BUT there appears to be a limit to the number of ID's (or characters) that are allowed in the string.  The command fails when I have more than 64 IDs in the statement (just under 1000 characters).  Later in the script, I use a similar 'where' statement in a v.extract command and have the same problem, so its not limited to ps.map.

My question: are there known length limits to the SQL select statement in GRASS?  Or perhaps I some other problem? 

Thanks for any help you can provide!  Let me know if you need more info.

Steve


More information about the grass-user mailing list