<p></p>
<p><b>@lonvia</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/osm2pgsql/pull/1969#discussion_r1249399283">src/middle-pgsql.cpp</a>:</p>
<pre style='color:#555'>> + "{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"
</pre>
<p dir="auto">This seems to be a very complicated way to say<br>
<code class="notranslate">SELECT array_agg((el->>'ref')::int8) FROM jsonb_array_elements($1) AS el WHERE el->>'type' = $2</code></p>
<hr>
<p>In <a href="https://github.com/openstreetmap/osm2pgsql/pull/1969#discussion_r1250538151">src/options.hpp</a>:</p>
<pre style='color:#555'>> @@ -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;
</pre>
<p dir="auto">Isn't 0 the current default (aka ram mode)?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/pull/1969#pullrequestreview-1509526359">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353UCIOI6IVMVWQ6ANL3XOKGQPANCNFSM6AAAAAAYRIN5WQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353VPCDR23Q7OVCK2WHTXOKGQPA5CNFSM6AAAAAAYRIN5WSWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTSZ7GFVO.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/osm2pgsql/pull/1969/review/1509526359</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/pull/1969#pullrequestreview-1509526359",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1969#pullrequestreview-1509526359",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>