We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Similarly to brianc/node-postgres#3219, COPY TO doesn't play nice with query_timeout. #126 fixed this issue for COPY FROM.
COPY TO
query_timeout
COPY FROM
I've been using this patch for some time now, and it seems to work:
const { to: copyTo } = require('pg-copy-streams'); const fixedCopyTo = (query, options) => { const streamQuery = copyTo(query, options); streamQuery.callback = () => {}; const handleError = streamQuery.handleError.bind(streamQuery); const handleReadyForQuery = streamQuery.handleReadyForQuery.bind(streamQuery); streamQuery.handleError = e => { streamQuery.callback(); handleError(e); }; streamQuery.handleReadyForQuery = () => { streamQuery.callback(); handleReadyForQuery(); }; return streamQuery; }; module.exports = fixedCopyTo;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Similarly to brianc/node-postgres#3219,
COPY TO
doesn't play nice withquery_timeout
. #126 fixed this issue forCOPY FROM
.I've been using this patch for some time now, and it seems to work:
The text was updated successfully, but these errors were encountered: