pg-copy-streams
Advanced tools
Comparing version 6.0.2 to 6.0.3
@@ -43,3 +43,9 @@ 'use strict' | ||
_writev(chunks, cb) { | ||
this.chunks.push(...chunks) | ||
// this.chunks.push(...chunks) | ||
// => issue #136, RangeError: Maximum call stack size exceeded | ||
// Using hybrid approach as advised on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply | ||
const QUANTUM = 32768 | ||
for (let i = 0; i < chunks.length; i += QUANTUM) { | ||
this.chunks.push(...chunks.slice(i, Math.min(i + QUANTUM, chunks.length))) | ||
} | ||
if (this._gotCopyInResponse) { | ||
@@ -46,0 +52,0 @@ return this.flush(cb) |
{ | ||
"name": "pg-copy-streams", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"description": "Low-Level COPY TO and COPY FROM streams for PostgreSQL in JavaScript using", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -135,2 +135,6 @@ ## pg-copy-streams | ||
### version 6.0.3 - published 2022-09-05 | ||
- copy-from: fix issue #136 when the _writev mechanism was triggered with a very large number of chunks | ||
### version 6.0.2 - published 2021-09-13 | ||
@@ -137,0 +141,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35566
593
261