-
-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flex config #1496
Flex config #1496
Conversation
joto
commented
May 14, 2021
- Test more of the flex config files
- Use jsonb instead of hstore in most flex config files
The jsonb data type is built into PostgreSQL, no hstore extension is needed. It is more flexible and there are more functions to extract data from it.
@joto, while I understand the desire to add jsonb as an additional type of tag storage column, wouldn't it be better to stick with hstore as default? hstore has been the default for quite some time, and many people may have written quite extensive SQL statements using the required syntax. Switching to jsonb might break quite a lot of existing workflows. From a pure user perspective, there is little to gain by switching to jsonb. hstore offers most of what users likely need. Also see the comments by Paul and Sarah here: #672 |
There is only one reason to stay with hstore: "we have always done it this way". Everything else points to json: better support in PostgreSQL, builtin (no "CREATE EXTENSION" needed), "industry standard", easier to understand for new users. I believe the advantages are large enough to make this the new standard. In a few years, nobody will even remember "the old ways" of doing things. But, its only in config files, so everybody can make the choice if and when to switch as they see fit. But default configs and the documentation should point to whatever is currently considered best and recommended usw. Also: The comments on #672 do not apply here. JSON support is already available and is easy to switch between hstore and json, there is no need for more command line options. So while it was hard to switch before, now it is easy. |
Ok, reasonable arguments. Curious when all this is going to land... |
As to the switch to json, this does raise one question: since json supports nested (dictionary like) structures, I wondered how the upcoming new implementation saves the tags? I guess it is just a flat structure, because I don't see any use for a nested structure in the context of OSM objects, so I can use:
json syntax instead of the equivalent:
for hstore? Or do you plan to have a root level, and I do need slightly more complex syntax than this? |