--
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 visit https://groups.google.com/d/msgid/elixir-ecto/321b5a0c-0fe7-48b5-b875-876ad0541f0cn%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-ecto/37431b48-5263-4469-93e5-b680744754c4n%40googlegroups.com.
fragment("fun(?, ?)", type(^arg1, :integer), type(^arg2, :integer))
SELECT *FROM (VALUES ('constant_value')) AS c(shared_col)CROSS JOIN (VALUES(1, 'Alice', 25),(2, 'Bob', 30),(3, 'Carol', 28)) AS people(id, name, age);
--
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 visit https://groups.google.com/d/msgid/elixir-ecto/5c258dd6-eee9-4fc0-9e32-64e217b71156n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "elixir-ecto" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-ecto/YEaa9YvvUuQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-ecto...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-ecto/CAGnRm4LPQ0tWp5e-UQsW-h2%3DEKMC_nRDgex-CVquaOFTcbJbgA%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-ecto/f360b3b2-39aa-4e51-92e3-9115c693e8fcn%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-ecto/bc12ae2a-b5b7-410f-b4f4-62aa5771fa89n%40googlegroups.com.
keep in mind that unnest flattens the array:
select UNNEST(ARRAY[Array['bob'], Array['alice']]);
unnest
--------
bob
alice
so with unnest you cannot insert into an array column so you would have to use jsonb. I do this usually when unnest doesn't work:
insert into TABLE
select record_to_insert.*
from jsonb_array_elements($1::jsonb) json_element,
jsonb_populate_record(null::TABLE, json_element) as
record_to_insert;
To view this discussion visit https://groups.google.com/d/msgid/elixir-ecto/CAGnRm4JFckXVHgsu9fpzV_SjmECjnBXAvZ%2B%2B-5Uw-COTF9LNZw%40mail.gmail.com.