Opened 15 years ago
#609 new defect
d.vect generates bogus SQL when 'attrcol' option is given more than once
| Reported by: | dylan | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5.0 |
| Component: | Display | Version: | svn-develbranch6 |
| Keywords: | d.vect SQL | Cc: | |
| CPU: | x86-32 | Platform: | Linux |
Description
Example based on today's 6.5-SVN:
d.mon x0 d.vect archsites disp=shape,attr attrcol=str1 attrcol=
Although the user should never construct a command-line such as this, I think that some kind of error checking should be involved. The following SQL is generated:
select str1, from archsites where cat = 1
I see this note in d.vect/main.c:
attrcol_opt = G_define_standard_option(G_OPT_COLUMN);
attrcol_opt->key = "attrcol";
attrcol_opt->multiple = NO; /* or fix attr.c, around line 102 */
attrcol_opt->guisection = _("Labels");
attrcol_opt->description = _("Name of column to be displayed");
It looks like something is trying to use multiple invocations of the 'attrcol' option to generate a list of columns to be sent to the DB driver.
Note:
See TracTickets
for help on using tickets.
