drizzle-team / drizzle-team/drizzle-orm

[BUG]: RangeError: Maximum call stack size exceeded on insert of large amount of rows

Open
#1,740 21 comments 40 reactions 0 assignees View on GitHub
improvement qb/crud
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.29.2

### What version of `drizzle-kit` are you using?

0.20.9

### Describe the Bug

Reopening https://github.com/drizzle-team/drizzle-orm/issues/269
I am trying to seed a test database by running `db.insert(someTable).values(newValues)`.

If `newValues.length` is >=5958, I get an error message saying `MAX_PARAMETERS_EXCEEDED: Max number of parameters (65534) exceeded`.

### Expected behavior

It should not have this error at any size. If anything, under the hood it should be doing something like I described here: https://github.com/drizzle-team/drizzle-orm/issues/797#issuecomment-1874159066

The ORM should be handling this, not application code.

### Environment & setup

pg

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.