[Tile-serving] [openstreetmap/osm2pgsql] New database middle (PR #1969)
Sarah Hoffmann
notifications at github.com
Mon Jul 3 09:31:51 UTC 2023
@lonvia commented on this pull request.
> + "{attribute_columns_definition}"
+ " members jsonb NOT NULL,"
+ " tags jsonb NOT NULL"
+ ") {data_tablespace};\n"
+
+ "CREATE OR REPLACE FUNCTION"
+ " {schema}\"{prefix}_member_ids\"(jsonb, char)"
+ " RETURNS int8[] AS $$\n"
+ " WITH items AS ("
+ " SELECT jsonb_array_elements($1) AS el"
+ " ), titems AS ("
+ " SELECT * FROM items WHERE el->>'type' = $2"
+ " ), refs AS ("
+ " SELECT (el->>'ref')::int8 AS id FROM titems"
+ " )"
+ " SELECT array_agg(id) FROM refs\n"
This seems to be a very complicated way to say
`SELECT array_agg((el->>'ref')::int8) FROM jsonb_array_elements($1) AS el WHERE el->>'type' = $2`
> @@ -146,6 +146,16 @@ struct options_t
*/
uint8_t way_node_index_id_shift = 5;
+ /// Database format (0=unknown/no database middle, 1=legacy, 2=new)
+ uint8_t middle_database_format = 1;
Isn't 0 the current default (aka ram mode)?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1969#pullrequestreview-1509526359
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1969/review/1509526359 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230703/e7b5ea4f/attachment.htm>
More information about the Tile-serving
mailing list