Closed tchoutri closed 2 years ago
A workaround is to make the type of uuid_list
format as .... :: uuid[]
, i.e. include the type-annotation in ToField
of that type. (That will save you from writing the type annotation elsewhere as well, but you may need to pay a price of newtype
).
Changing parser won't be enough, as formatMany
duplicates the VALUES
clause, we would need to preserve the extras, and that is a big change. As there is relatively cheap workaround, I'd rather not do it.
@phadej okay I've implemented this and I consider my problem fixed. Thanks a lot!
Reading the documentation for
formatMany
:which means that this kind of query is not permitted:
However, this is perfectly valid SQL, and without the type signature for the
uuid_list
field, PostgreSQL is going to trip and fail to infer the proper type (this is also the case for lists of enums):@phadej Do you see a way out of this? Would you endorse a change to the parser to allow for this?