@joto requested changes on this pull request.

Thanks, the PR looks pretty good except  for the small changes I mention.

> +        conn.exec("REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM 
> "
+                  "PUBLIC, limited;");
+        conn.exec("REVOKE CREATE ON SCHEMA public FROM PUBLIC, limited;");
+        conn.exec(
+            "CREATE SCHEMA IF NOT EXISTS myschema AUTHORIZATION limited;");
+        conn.close();
+        return testing::opt_t()
+            .slim()
+            .flex(conf_file)
+            .schema("myschema")
+            .user("limited");
+    }
+};
+
+// Return a string with the schema name prepended to the table name.
+std::string with_schema(char const *name, options_t const *options)

We are not changing the options, so we should probably use a `const &` instead 
of `const *` as is done elsewhere in the osm2pgsql code. This will also make 
calling the function simpler.

> +        conn.exec("REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM 
> "
+                  "PUBLIC, limited;");
+        conn.exec("REVOKE CREATE ON SCHEMA public FROM PUBLIC, limited;");
+        conn.exec(
+            "CREATE SCHEMA IF NOT EXISTS myschema AUTHORIZATION limited;");
+        conn.close();
+        return testing::opt_t()
+            .slim()
+            .flex(conf_file)
+            .schema("myschema")
+            .user("limited");
+    }
+};
+
+// Return a string with the schema name prepended to the table name.
+std::string with_schema(char const *name, options_t const *options)

Can we name the parameter `table_name`? So it is clear that that's the table 
parameter and the schema comes from the options.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2261#pullrequestreview-2344968262
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2261/review/[email protected]>
_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving

Reply via email to