drizzle-team / drizzle-kit-mirror

Docs and issues repository for drizzle-kit
291 stars 17 forks source link

malformed array literal #377

Open i8ramin opened 4 months ago

i8ramin commented 4 months ago

The latest version of drizzle-kit studio throws a "malformed array literal" error when trying to save array values in a jsonb column (this did not happen in a previous version)

worked in "drizzle-kit": "^0.20.14"

broken in "drizzle-kit": "^0.20.17"

column causing the error in schema:

strategies: text('strategies').array(),

value input which throws the eror:

["foo","bar"]

Details about the error in console logs:

  length: 223,
  severity: 'ERROR',
  code: '22P02',
  detail: '"[" must introduce explicitly-specified array dimensions.',
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: "unnamed portal parameter $1 = '...'",
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'arrayfuncs.c',
  line: '272',
  routine: 'array_in'
i8ramin commented 4 months ago

It looks like the following syntax works

{amazon_rainforest:api,diffbot:analyze}