[Tagging] Extended Conditions - response to votes

Gerhard Hermanns hermanns at ptt.uni-due.de
Thu Jul 5 10:39:52 BST 2012

Sorry, I didn't realise I was on the 'Tagging' instead of the 'Talk-de' 
list. And the first link was wrong, too ...   (note to self: drink 
coffee first, write to list afterwards ...)

So, again in English:
/>>Honestly, for me this cause has become too complex, so I won't vote 
(for now).
In my understanding there is one k.o. criterium, mentioned by Walter in 
the German forum ([1], post #81). He objected that there are problems 
with SQL queries and the HSTORE scheme, Georg agreed ([2], Post #89). I 
don't understand much of this but I agree that the queries have to work 
in every case. So my question is: Can anybody solve the problem 
mentioned by Walter in favour of the proposal? I'm talking about a real 
query test, not statements like 'that should work in theory'.<</

And now, to make up for my blunder, here is a (rough) translation of 
Walters and Georgs posts in the German forum:

'In Postgresql (the database OSM uses internally) tags are stored in the 
form key=value. In the Simple-/Snapshot scheme the so called HSTORE is 
used for this; that is a data structure for depositing any number of 
information of an object (i.e. the tags of a node/way).
All postgresql specific HSTORE queries, changes, indexing - everything - 
only can work with complete keys, the values can be arbitrary [3].
Queries like "/List all nodes with the key 'maxspeed' or 
'maxspeed:wet'/" are no problem at all, but a query like "/List all 
nodes with 'maxspeed%'/" doesn't work! (% is the wildcard for SQL).
Queries for values (what stands behind the "=") can be done easily and 
with good performance, too.
In other words: *The database the entire OSM data is kept on doesn't 
support variable keys when tagging.* You can save them but you cannot 
query them.'

And here Georgs (shortened) reply:

The problem of variable database keys (which coincide with the OSM keys) 
mentioned by Walter persists.
Therefore: Variable conditions in the key prevent meaningful database 
queries [...]. Variable conditions in the value on the other hand remain 
a matter of applications'

Sorry for the mess,

[1] http://forum.openstreetmap.org/viewtopic.php?pid=252489#p252489
[2] http://forum.openstreetmap.org/viewtopic.php?pid=252834#p252834
[3] http://www.postgresql.org/docs/9.1/static/hstore.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tagging/attachments/20120705/e5d87054/attachment.html>

More information about the Tagging mailing list