-
-
Notifications
You must be signed in to change notification settings - Fork 474
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
Properly set schema for osm2pgsql_find_changed_ways() #2261
Properly set schema for osm2pgsql_find_changed_ways() #2261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the PR looks pretty good except for the small changes I mention.
@falko17 Most CI runs failed with this:
Please check that. |
82460e9
to
4eb9097
Compare
Thank you for the quick review! I've addressed both comments now.
On most systems, password authentication seems to be enforced for PostgreSQL—this wasn't the case on my system, hence I didn't catch it. Should be fixed now. |
Looks much better. The failing builds are probably transitory, we'll try to run them again. Can you please fix this report from clang-tidy:
i.e. use Thanks! |
4eb9097
to
cd17e6b
Compare
Yes, I've changed it to the braced initializer list now. |
@joto The PR should be fully fixed now, but two of the CI runs are still failing—given the errors shown in the logs, I don't think this is the fault of the changes. Can we try simply re-running those? |
Sorry for the delay. It is always annoying when the CI breaks for unknown reasons, it really has nothing to do witth your code, but it means we have to be extra careful. Thanks for the nice PR with tests and everything! |
A temporary function
osm2pgsql_find_changed_ways
may be created during the update process, which has been placed under thepublic
schema, regardless of any chosen custom schema. This is a problem if one implements security based on schemas, e.g., by assigning a custom schema for osm2pgsql and restricting it from accessingpublic
elements (as mentioned at the end of section 3.3 of the manual).This PR fixes that by using the configured schema. Additionally, tests are added in which a situation like the above is simulated (e.g., a user that can only access a custom schema and not
public
). Please tell me if there's anything I should improve/change before this can be merged.