Skip to content

Commit

Permalink
Properly set schema for osm2pgsql_find_changed_ways()
Browse files Browse the repository at this point in the history
  • Loading branch information
falko17 committed Oct 2, 2024
1 parent 7d7a970 commit a3a21a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/middle-pgsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ void middle_pgsql_t::get_node_parents(idlist_t const &changed_nodes,
// better to do a full table scan which totally destroys performance.
// This is due to the PostgreSQL statistics on ARRAYs being way off.
queries.emplace_back(R"(
CREATE OR REPLACE FUNCTION osm2pgsql_find_changed_ways() RETURNS void AS $$
CREATE OR REPLACE FUNCTION {schema}osm2pgsql_find_changed_ways() RETURNS void AS $$
DECLARE
changed_buckets RECORD;
BEGIN
Expand All @@ -677,8 +677,8 @@ BEGIN
END;
$$ LANGUAGE plpgsql
)");
queries.emplace_back("SELECT osm2pgsql_find_changed_ways()");
queries.emplace_back("DROP FUNCTION osm2pgsql_find_changed_ways()");
queries.emplace_back("SELECT {schema}osm2pgsql_find_changed_ways()");
queries.emplace_back("DROP FUNCTION {schema}osm2pgsql_find_changed_ways()");

queries.emplace_back(R"(
INSERT INTO osm2pgsql_changed_relations
Expand Down

0 comments on commit a3a21a2

Please sign in to comment.