Hi. Thanks for that hint, but I fear, it's not completely correct what you wrote...
I want to ask, if a specific value is contained in an array. Your query would create an array, I think (that's correct for update, but wrong for select). Nevertheless: thanks for the hint - I read through the documentation for GIN indices [1] and Arrays [2] again.
I think, to get all way-ids, that are connected to a specific node with id node_id I would have to do sth. like:
SELECT osm_id AS way_id FROM planet_ways WHERE nodes && node_id = ANY(nodes)
yes, that should be possible. Thanks again.
regards Peter
[1] http://www.postgresql.org/docs/9.0/static/gin.html [2] http://www.postgresql.org/docs/8.2/static/arrays.html
Am 20.12.2011 17:15, schrieb Kai Krueger:
The query osm2pgsql runs for this is "UPDATE %p_ways SET pending = true WHERE nodes&& ARRAY[$1] AND NOT pending;"
You don't want the update or pending part, but the "WHERE nodes&& ARRAY[osm_id]" should work for you.