-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
insufficient data left in message #39
New issue
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
Comments
I need version of postgres, operating system, and simple code I can run to reproduce the error. Also, are you using the native driver or the pure javascript flavor? |
looks like its the latest node that broke it, i'm using the javascript (the default) flavor, ubuntu 11.04, postgres 8.3 and i'll get you some code.. |
client.query({
text: "SELECT * FROM users WHERE username = $1 and password = $2",
values: ['user', 'password']
},function(err, result){
if(err) error(err);
// do stuff
}); need more? |
no, just upgraded to v0.4.10 and tests are failing all over the place. not happy. |
ok, yeah that sucks, wonder what changed |
dunno...debugging it now. any help would be appreciated. Not even the unit tests (those which do not need postgres) are passing. has to do w/ buffer changes, but haven't pinpointed it |
hop on #node.js if you want to discuss |
found a fix, patching soon |
great! good work! |
working great, thx! |
We ran into this same error and are trying to track it down. We're using node 0.4.12 and we've certainly been using recent versions of pg with this fix. Can you give a little more info about why this happens and we might try reproducing it in our environment? node 0.4.12 |
Hey @polotek. Sure thing... The issue was caused by a change in the signature to buffer.write. I patched node-postgres on November 1st with a fix for this issue. Line 40 in 2cddf2a
I would recommend upgrading pg to the latest version (I believe the fix is included in pg@0.6.5) unless you have a strong reason not to. |
To elaborate further...the buffer.write null terminated string encoding changed. Here is the issue in which I introduced the patch. Bug introduced by this node patch nodejs/node-v0.x-archive@6a72e52 Which, incidentally was introduced to close this issue I submitted almost a year ago: |
Ah, yes the other ticket is more recent. I was just looking at the dating of this ticket. Will update accordingly. Thanks. pg has been working very well for us. |
between either the upgrade to Node v0.4.10 or the upgrade to the latest pg module now gives me this error for any prepared statement:
The text was updated successfully, but these errors were encountered: