-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
examples don't seem to work out-of-the-box #3
Comments
I really appreciate you getting in touch with me about this. I'd love to walk through the issues you're experiencing with you tomorrow. Are you on IRC? Google talk? I'll be online all day in #dailyjs and my google talk name is '[email protected].' I've been out of town today and really busy this week doing shows with my band, but I'll be more involved with node-postgres starting on Monday of next week. I've got some big plans with a new API, transparent connection pooling, and a more "nodey" interface in the works. I'll follow up on this tomorrow whether or not you contact me online. In the mean time...thanks for the feedback and take care. Brian |
Okay, I'm on mibbit on #dailyjs, and sent you a google talk invite. Hopefully we can get it sorted out. Thanks very much for wanting to help me! |
Thanks to a lot of detailed debugging help from Brian, we determined that the most likely cause of my issue was intermittent networking problems with my Windows server, because even psql could not connect sometimes (I just got lucky the first few times I tried it.) Thanks again! |
Indeed, it works with postgresql 8.3 if I install that on turnkey itself. |
pg-cursor no longer returns the empty array 'done' signal to the callback until the cursor recieves a readyForQuery message. This means pg-query-stream will not emit 'close' or 'end' events until the server is __truly__ ready for the next query. This fixes some race-conditions where some queries are triggered off of the `end` event of the query-stream closes #3
Prevent `generic-pool` error when releasing a client with an error. Fixes #2
Intriguing project! Unfortunately, I can't seem to get the current code base to do...anything for sure.
I'm running the latest Turnkey Linux stable in VirtualBox on a win32 platform. I successfully built node.js, and can run the basic example from nodejs.org and get it to serve a page to a client browser on win32.
But when I replace that with the example in the node-postgres readme, which I modified only to match my system's connection parameters, it runs, but nothing happens--no console output aside from the initial newline. Hitting it from a web browser says it can't connect (which makes sense, since it's not running a server.) If I add "console.log('start')" as the first line and similarly for the last line, both get logged one after another immediately when I run it, but still, no apparent database action.
So I tried the example app at https://github.com/brianc/node-postgres/wiki/Example . First of all, I had to change all the places where it said ?() to say function(), because I was getting syntax errors (were they supposed to be "?"? If so, is there some other missing dependency or setup step?) After that, it ran, but same thing again just sitting there after a newline, except that hitting it from a web browser results in a timeout (even if I change the port to 80 in the example code, or do :3000 in the url.) If I do the start/end console log statements, they too come out immediately one after another upon startup.
If I change the connection code to the wrong host, I get the appropriate error. If I instead change to the wrong port, user, password, or database, and I get no error but still no results. Lastly, I can connect to my postgres database using psql from the same Linux command-line I'm running node.js from.
Not sure what else to try...any hints?
The text was updated successfully, but these errors were encountered: