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
Add support for hstore #6
Conversation
Maybe, as you say, define hstore strictly on jiffy-like format |
I would vote for avoiding ambiguity. |
Would 17.0's map be better? |
Given that R17 isn't even released yet, and the conservative nature of many in the Erlang community, I think a solution that only works for that is not optimal. I think I would try and do something like:
|
jiffy-like format is enforced now |
This has been merged into the devel branch! Thank you! |
I'm actually getting some errors with the tests. What version are you running of Postgres? |
|
Did you update the test schema? It needs "CREATE EXTENSION hstore" and an extra column to do the serialization test. |
Yes, I did. I'm on Postgres 9.1.13 |
My make test result:
As usual, those are ssl tests. |
Shows this:
|
Yes, it's totally random:
shows
|
Idea: API to fill in type cache (ets or the process dictionary?) by querying the database, that is called at connect time, and whenever the user wants. So, if you know you are going to fool around with extensions during your session, you can regenerate the type cache. |
I have pushed a version of this to the dynamic_types branch - all the tests pass, so have a look at it and see what you think. |
We have hstore support now. Thanks! |
chore: merge 'upstream/devel' into master
Currently typespec is:
"jiffy-like" format is required for array support since there's no trivial way to distinguish between an array of hstore and a hstore.
Return type for hstore is always: [{binary(), binary() | null}] for convenience. Maps in 17.0 will solve this problem though.
Opened a pull request because I need some discussion about this.