Hi Daniel,
Thank you very much for reporting. Yes, this is a known issue:
Unfortunately, PostgreSQL:
- Doesn't overload all these operators to work with any combination of text[]/text[], text[]/varchar[], varchar[]/text[], varchar/varchar, and there's no implicit conversion when arrays are involved, as far as I know.
- Needs quite a bit of explicit casting with array bind variables (or other "advanced" data types)
Historically, in jOOQ, all Strings are mapped to varchar types, even if in PostgreSQL, text is probably a bit more popular.
Unfortunately, I currently don't really know a thorough fix for #4754 with all the above constraints. But there's an easy workaround, of course: Use plain SQL:
DSL.field("{0} @> {1}::text[]",
D_BANDWIDTHS.DESCRIPTION,
DSL.val(theArray));
Hope this helps,
Lukas