Prepared statements maximum bindings
See original GitHub issueI am trying to do some big bulk inserts to Postgres via node-postgres When the bindings array exceeds 65536 values then passes to postgres the rest of values and when the query it runs I take the error
[error: bind message supplies 4 parameters, but prepared statement "" requires 65540]
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
PostgreSQL node.js prepared statements maximum bindings
I am trying to do some big bulk inserts to Postgres via node-postgres When the bindings array exceeds 65536 values ...
Read more >Binding Values To Prepared Statements - SQLite
The leftmost SQL parameter has an index of 1. When the same named SQL parameter is used more than once, second and subsequent...
Read more >Documentation: 15: PREPARE - PostgreSQL
Prepared statements potentially have the largest performance advantage when a single session is being used to execute a large number of similar statements....
Read more >Using parameterized queries - Amazon Athena
The maximum number of prepared statements in a workgroup is 1000. SQL statements. You can use the PREPARE , EXECUTE and DEALLOCATE PREPARE...
Read more >MySQL 8.0 Reference Manual :: 13.5 Prepared Statements
SQL syntax for prepared statements is based on three SQL statements: ... The following examples show two equivalent ways of preparing a statement...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brianc It would still be useful if this would somehow throw a different error.
As it stands, for a parameterized query with X parameters you just get the error [bind message supplies
X modulo 65536
parameters, but prepared statement “” requiresX
] which is very unhelpful for diagnosing the cause for the problem.Also the limit of 34464 parameters is wrong, at least for postgresql 9.6.3 I can do a single insert with 65535 parameters without problems.
@konhondros Postgres itself doesn’t support more than 34464 parameters for a bound statement. You’ll need to break up your bulk insert into multiple statements.