In year 2012, seeing the output of 112 confused me, and would potentially
confuse any JS noob. I thought it was some bug in node-postgres.
Presumably, JS starts counting time from Jan 1, 1900!
Also, according to [1], getYear() is deprecated and one should use getFullYear()
instead.
[1] http://www.w3schools.com/jsref/jsref_obj_date.asp
This should fix the following warning on windows:
..\src\binding.cc(117): warning C4800: 'int' : forcing value to bool 'true' or
'false' (performance warning)
Spotted in issue #165.
notify test fails on the version of postgres running on travis. I need to investigate this. Since it's an extremely non-important test & coupled to a particular version of postgres I'm going to remove until I can figure out a better way to reproduce.
* add private method const char *GetLastError() to src/binding.cc
* add var const char *lastErrorMessage to SendQuery in src/binding.cc
* throw result of PQErrorMessage inside SendQuery
This commit replaces the static/vague error message "PQsendQuery
returned error code" with the actual message text of the error.
The method GetLastError() returns the text of PQErrorMessage.
GetLastError is called from within SendQuery to retrieve the message.
* add private method const char *GetLastError() to src/binding.cc
* add var const char *lastErrorMessage to SendQuery in src/binding.cc
* throw result of PQErrorMessage inside SendQuery
This commit replaces the static/vague error message "PQsendQuery
returned error code" with the actual message text of the error.
The method GetLastError() returns the text of PQErrorMessage.
GetLastError is called from within SendQuery to retrieve the message.