Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.to.db: fix option=query #2085

Merged
merged 1 commit into from
Jan 28, 2022
Merged

v.to.db: fix option=query #2085

merged 1 commit into from
Jan 28, 2022

Conversation

metzm
Copy link
Contributor

@metzm metzm commented Jan 12, 2022

with option=query, query columns can not only be columns, but also SQL expressions like count(x) or avg(x). In these cases the check for column type fails, and it is up to the user to first create a new column of the appropriate type for storing results, before running v.to.db.

@metzm metzm added bug Something isn't working backport_needed vector Related to vector data processing C Related code is in C labels Jan 12, 2022
@metzm metzm added this to the 8.0.1 milestone Jan 12, 2022
@metzm metzm requested a review from veroandreo January 12, 2022 19:57
Copy link
Contributor

@veroandreo veroandreo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the example added in v.rast.stats 👍

@metzm metzm merged commit 3f7bd7e into OSGeo:main Jan 28, 2022
@metzm metzm deleted the v.to.db_query branch January 28, 2022 10:23
@metzm
Copy link
Contributor Author

metzm commented Jan 28, 2022

To be backported: 3f7bd7e

neteler pushed a commit that referenced this pull request Jan 28, 2022
With `option=query`, query columns can not only be columns, but also SQL expressions like `count(x)` or `avg(x)`. In these cases the check for column type fails, and it is up to the user to first create a new column of the appropriate type for storing results, before running `v.to.db`.
@neteler
Copy link
Member

neteler commented Jan 28, 2022

Backport done

ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
With `option=query`, query columns can not only be columns, but also SQL expressions like `count(x)` or `avg(x)`. In these cases the check for column type fails, and it is up to the user to first create a new column of the appropriate type for storing results, before running `v.to.db`.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
With `option=query`, query columns can not only be columns, but also SQL expressions like `count(x)` or `avg(x)`. In these cases the check for column type fails, and it is up to the user to first create a new column of the appropriate type for storing results, before running `v.to.db`.
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
With `option=query`, query columns can not only be columns, but also SQL expressions like `count(x)` or `avg(x)`. In these cases the check for column type fails, and it is up to the user to first create a new column of the appropriate type for storing results, before running `v.to.db`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C Related code is in C vector Related to vector data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants