I need a little information regarding the use of d.sites.pg.
I find that a query that runs properly in postgres will behave differently
based on what interface I choose with d.sites.pg. If I use the tcltk
interface, I get an error regarding the "where" portion of the query. If for
instance I use 'where att ~* 'aa'" an error is thrown with a message that
'aa' is not a valid option, even though it works fine postgres. This same
error occurs if I use the command line using something like the following:
d.site.pg tab=gully map=boundary cats=att where="~*'aa'"
if run without the double quotations, but which states that attribute 'x'
cannot be found, when they are present.
If I run the command from the GRASS command line, answering the individual
prompts, the query runs properly and the results are plotted properly. Can
someone explain this?
John Dougherty
John Dougherty wrote:
I need a little information regarding the use of d.sites.pg.
I find that a query that runs properly in postgres will behave differently
based on what interface I choose with d.sites.pg. If I use the tcltk
interface, I get an error regarding the "where" portion of the query. If for
instance I use 'where att ~* 'aa'" an error is thrown with a message that
'aa' is not a valid option, even though it works fine postgres. This same
error occurs if I use the command line using something like the following:
d.site.pg tab=gully map=boundary cats=att where="~*'aa'"
if run without the double quotations, but which states that attribute 'x'
cannot be found, when they are present.
If I run the command from the GRASS command line, answering the individual
prompts, the query runs properly and the results are plotted properly. Can
someone explain this?
The command line is subject to the shell's syntax, and arguments
entered in tcltkgrass are subject to both Tcl's general syntax and the
syntax of its "open" command. OTOH, if you invoke a command without
arguments, the values which you provide in response to the prompts
aren't subject to any processing.
Also, it's possible that tcltkgrass doesn't handle certain special
characters correctly; the command execution logic is somewhat
convoluted.
--
Glynn Clements <glynn.clements@virgin.net>