-
I wrote some example code below with the issue. Basically the table has an id, an "inner" jsonb column and a "type" column. The error is on the very last line. My workaround is just suffixing an "as T[]" Is there a better way?
gives this error:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Short answer: indeed, it's a bug... 😞 Long answer: historically, if was possible to pass types like A fix is on the way: #383 |
Beta Was this translation helpful? Give feedback.
Short answer: indeed, it's a bug... 😞
Long answer: historically, if was possible to pass types like
number
as row type, and these would be become{ '?column?': T }
, as postgresql does with unamed columns (like inSELECT 42;
). But it was too painful and not really used so contraints onT
where added, to enforceobject
s only (see types), then transforming to'?column?'
isn't even possible anymore, so that part should have been removed, to avoid bugs like in your case 😅A fix is on the way: #383