Since ParameterizedTypes are dumped to the DB as tuples, this PR will allow more complex Ecto.ParameterizedType to be logged as well.
[debug] QUERY OK db=9.0ms
INSERT INTO "posts" ("array_of_strings","date","datetime","decimal","integer","map","money","multi_money","naive_datetime","string") VALUES ('{hello,world}','2022-04-15','2022-04-15T22:05:37.850495Z',0.12,0,'{"test":true}','(USD, 390)','{"(USD, 230)","(USD, 180)"}','2022-04-15T22:05:37.851978','Post 1') RETURNING "id"
Please note that after this change, I started to see the following debug log. Thoughts?
[debug] %Postgrex.Query{cache: :statement, columns: nil, name: "ecto_insert_posts_0", param_formats: nil, param_oids: nil, param_types: nil, ref: nil, result_formats: nil, result_oids: nil, result_types: nil, statement: "INSERT INTO \"posts\" (\"array_of_strings\",\"date\",\"datetime\",\"decimal\",\"integer\",\"map\",\"money\",\"multi_money\",\"naive_datetime\",\"string\") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10) RETURNING \"id\"", types: nil} uses unknown oid(s) 563461, 563462forcing us to reload type information from the database. This is expected behaviour whenever you migrate your database.
First of all, thank you so much for this lib, it's so handy and awesome.
Context
I have multiple
Ecto.ParameterizedType
using Postgres types in the DB that can't be logged, raising the error below:Changes
Since
ParameterizedTypes
are dumped to the DB as tuples, this PR will allow more complexEcto.ParameterizedType
to be logged as well.Please note that after this change, I started to see the following debug log. Thoughts?