schema "table" dofield :settings, :binaryend
--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/fbb525d7-4974-4986-81da-7427d977ecaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/0cc523b4-c4c8-447b-9b3c-1c4e2188cace%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/CAM_eaphRD9ZM0c5rqVFVuXbH5m7_HVyzT8cWWRX9B1oEMSobdg%40mail.gmail.com.
Hi, Eric.
Take a look at my message with solution above.
There were 2 issues for me:
1) No Ecto support for hstore, solution: https://gist.github.com/romul/7fd48cb85d77819511f2#file-hstore-ex
2) hstore support in Postrex has an issue in case when you work with PG schemas (besides public).
Here is how type_info for oid = 21066 looks like in my case:
%Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "schema_name.hstore_in", oid: 21066, output: "schema_name.hstore_out", receive: "schema_name.hstore_recv", send: "schema_name.hstore_send", type: "hstore"}
So, I have to use the following workaround https://gist.github.com/romul/7fd48cb85d77819511f2#file-hstore_extension-ex-L12-L18,
b/c https://github.com/ericmj/postgrex/blob/master/lib/postgrex/extensions/binary.ex#L126 would never match without it.
Because of this I propose to use %TypeInfo{type: "hstore"} in ecode/decode for hstore in Postgrex.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/fbb1f737-e5a0-4e11-bfb5-c889cbef3911%40googlegroups.com.