[GRASS-dev] v.db.update: any reason to keep both value and qcolumn parameter ?

Markus Neteler neteler at osgeo.org
Tue Sep 30 05:15:23 EDT 2008


On Tue, Sep 30, 2008 at 10:58 AM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> In v.db.update we currently have:
>
> #%option
> #% key: value
> #% type: string
> #% description: Value to update the column with, can be (combination of)
> other column(s)
> #% required : no
> #%end
> #%option
> #% key: qcolumn
> #% type: string
> #% description: Column to query
> #% required : no
> #%end
>
>
> 'qcolumn' was added in a later stage, AFAIK mostly because of a
> misunderstanding of 'value'. As said in the help text, value can be either a
> value, a name of another column or a combination of other columns, so it
> already comprises qcolumn.

Only today I learned that (I added qcolumn if I remember correctly)
:-)

> However, in its current version (since rev 23578), value is now adapted
> according to column type, which means that you cannot use column operations
> on varchar columns (e.g. concatenation).
>
> So, we should either:
>
> - change the doc to reflect that value should only be a nominal value, or

yes

> - go back to the original, i.e. no qcolumn and no type checking for value,
> so that it's up to the user to use correct quoting

No - I don't find it obvious at all that "value" could be a column name.
qcolumn also exists in other commands AFAIK, to that's consistent.

Markus


More information about the grass-dev mailing list