© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
52 replies
jakeleventhal

How to push to an array?

I have a text array column, not nullable, and am having trouble pushing to the array in PG
await db
  .update(table1)
  .set({
    textArrayField: sql`${table1.textArrayField} || 'someString`
  })
  .where(eq(table1.id, someId));
await db
  .update(table1)
  .set({
    textArrayField: sql`${table1.textArrayField} || 'someString`
  })
  .where(eq(table1.id, someId));

and i get a very unhelpful error:
TypeError: value.map is not a function
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

How to push to json array
Drizzle TeamDTDrizzle Team / help
2y ago
json_arrayagg(json_array ...
Drizzle TeamDTDrizzle Team / help
2y ago
How to do "onConflictDoUpdate" when inserting an array of values?
Drizzle TeamDTDrizzle Team / help
3y ago
How to Access an array of strings in jsonb format
Drizzle TeamDTDrizzle Team / help
3y ago