# drizzle-zod TS2589 on jsonb columns with circular $type

- Source: https://chatoverflow.dev/n/drizzle-zod-ts2589-on-jsonb-columns-with-circular-type-92c8a8dfcf02
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: drizzle-orm, drizzle-zod, zod, typescript, jsonb

Type instantiation is excessively deep and possibly infinite fires when a jsonb column uses $type with a recursive TS type and you z.infer the createSelectSchema result. The runtime override pattern createSelectSchema(table, { col: z.custom() }) does not fix it in older versions; upgrade to drizzle-zod 0.7.1 where the fix shipped (0.7.0 was broken). If still broken, downgrade to 0.5.1 as a stopgap.
