Ricky Ng-Adam
6216f6089f
test to reproduce behavior of issue brianc/node-postgres#549
...
a fix was provided in 5079c1e0c41f431ac2e02c40ebd875d8fbb34004;
test is modeled on query-error-handling-tests.js;
test both kill query and disconnection on prepared statement execution;
make connection error string message consistent between native and non-native;
disable test server-side kill for native as it hangs;
sync can cause error to be emitted so we catch that;
we also move _ending state before _send is called.
2014-04-24 08:36:54 +08:00
Brian C
1047aeb3c2
Merge pull request #571 from letsface/ended-event-on-pool-drained
...
emit event 'ended' on pool drained
2014-04-22 16:27:57 -05:00
Brian C
65d177e069
Merge pull request #573 from karvaporo/master
...
Remove unused parameter 'name' from DataRowMessage.
2014-04-22 16:15:59 -05:00
Matti Virolainen
17dbb640a6
Remove unused parameter 'name' from DataRowMessage.
2014-04-19 11:54:12 +03:00
Ricky Ng-Adam
0882c8da02
from ended to end
2014-04-18 23:30:45 +08:00
Brian C
c1d3a14a82
Merge pull request #570 from brianc/pause_resume_drain
...
remove pause/resumeDrain functions from native code as discussed in issue #515
2014-04-18 09:41:55 -05:00
Ricky Ng-Adam
9ab6ed76d1
remove extra whitespace
2014-04-17 17:04:46 +08:00
Ricky Ng-Adam
85c28e9088
destroyAllNow also has a callback
2014-04-17 16:25:59 +08:00
Ricky Ng-Adam
382d6d66f9
emit event when all pool are actually destroyed
2014-04-17 16:18:49 +08:00
Philipp Borgers
fa3b1ccc5b
remove pause/resumeDrain functions from native code as disccued in issue #515
2014-04-16 19:10:49 +02:00
Philipp Borgers
732fb7cc61
do not abuse label as comment in test-case
2014-04-16 19:02:54 +02:00
Philipp Borgers
5575bac1e6
remove unused setup-bench-data.js as discussed in issue #548
2014-04-16 14:34:31 +02:00
Brian M. Carlson
81f63f4924
Bump version
2014-04-12 14:19:35 -05:00
Brian C
002db23853
Merge pull request #566 from hoegaarden/master
...
Upgrade pgpass
2014-04-12 14:19:08 -05:00
Brian M. Carlson
a6747ecd7b
Bump version
2014-04-12 00:34:21 -05:00
Brian C
88ff4701d8
Merge pull request #567 from brianc/fix-memory-leak
...
Fix memory leak with domains
2014-04-12 00:32:52 -05:00
Brian M. Carlson
9c87253aff
Fix memory leak with domains
2014-04-12 00:29:44 -05:00
Hannes Hörl
045ee5bdcc
Upgrade pgpass
2014-04-09 23:39:26 +02:00
Brian C
492f1eb709
Merge pull request #561 from tgriesser/unused-vars
...
Remove unused variables
2014-04-09 09:15:08 -05:00
Tim Griesser
cd050334ba
Removed various unused vars
2014-04-09 08:46:17 -04:00
Brian C
7442ea9285
Merge pull request #562 from tgriesser/remove-once
...
Remove legacy .once events shim
2014-04-08 22:17:52 -05:00
Tim Griesser
0565ed6c05
Remove legacy .once events shim
2014-04-08 21:29:51 -04:00
Brian M. Carlson
981b4345f0
Merge branch 'master' of github.com:brianc/node-postgres
2014-04-06 12:56:43 -05:00
Brian M. Carlson
9b74634fdb
Bump version
2014-04-06 12:56:29 -05:00
Brian M. Carlson
bd74d48791
Fix query error emit on native bindings
2014-04-06 12:55:26 -05:00
Brian C
de96422442
Update NEWS.md
...
spelling fixes
2014-04-06 12:42:47 -05:00
Brian M. Carlson
6d64abc0e2
Bump version
2014-04-06 12:38:33 -05:00
Brian M. Carlson
99273ae798
Update changelog
2014-04-06 12:38:19 -05:00
Brian M. Carlson
bca78d067d
Update news
2014-04-06 12:38:06 -05:00
Brian M. Carlson
357b64d704
Remove query emit 'end' event when query has error
...
Closes #547
2014-04-06 11:53:47 -05:00
Brian C
c3f5c06c44
Merge pull request #558 from hoegaarden/master
...
upgrade pgpass
2014-04-06 11:18:32 -05:00
Brian C
f3fc6ff705
Merge pull request #546 from CartoDB/2.11-ensure-connect-callback
...
Ensure connect callback is invoked on premature socket hangup
2014-04-06 11:18:23 -05:00
Brian C
82486929a9
Merge pull request #555 from benesch/custom-type-coercion
...
Supercharge `prepareValue`
2014-04-06 11:16:33 -05:00
Sandro Santilli
e72aff4cfb
Have stream emit 'close' rather than 'end' for sake of testing
2014-04-04 16:11:44 +02:00
Sandro Santilli
e1b1c62e3e
Do not emit 'end' twice from Connection on close
2014-04-04 10:07:07 +02:00
Hannes Hörl
58f0e87fe0
upgrade pgpass
2014-04-03 22:19:42 +02:00
Nikhil Benesch
619ba46ffe
pass prepareValue
hook to toPostgres
...
Pass `toPostgres` type-coercers a reference to the `prepareValue`
function to ease constructing literals composed of other Postgres types.
2014-04-03 10:28:02 -04:00
Brian C
7dbc4c9845
Merge pull request #552 from geon/patch-1
...
Added missing argument to handleError method call.
2014-04-03 08:58:48 -05:00
Brian C
fb9876c896
Merge pull request #554 from benesch/remove-dead-types-code-path
...
query: remove dead type-parsing code path
2014-03-31 11:55:59 -05:00
Nikhil Benesch
6ced524390
allow type-coercion overrides for custom objects
...
Attempt to call a `toPostgres` method on objects passed as query values
before converting them to JSON. This allows custom types to convert
themselves to the appropriate PostgreSQL literal.
This strategy is fully backwards-compatible and uses the same pattern as
the `toJSON` override.
2014-03-30 20:39:56 -04:00
Nikhil Benesch
c41eedc3e0
properly prepare complex arrays
...
`arrayString` duplicated too much of `prepareValue`'s logic, and so
didn't receive bugfixes for handling dates with timestamps. Defer to
`prepareValue` whenever possible.
This change enforces double-quote escaping of all array elements,
regardless of whether escaping is necessary. This has the side-effect of
properly escaping JSON arrays.
2014-03-30 19:12:18 -04:00
Nikhil Benesch
364cf4b3ca
utils: convert tabs to spaces
2014-03-30 19:11:02 -04:00
Nikhil Benesch
7faa2b325e
utils: reorganize prepareValue conditional for clarity
...
Prefer positive tests; group tests for specific objects.
2014-03-30 19:03:28 -04:00
Nikhil Benesch
b778f2bdf0
utils-tests: add unit tests for prepareValue
2014-03-30 19:03:24 -04:00
Nikhil Benesch
cb7bbe6502
query: remove dead type-parsing code path
...
Type parsing was factored out into the pg-types package. Remove vestigal
`noParse` function.
2014-03-30 19:02:11 -04:00
Nikhil Benesch
5c49a4ab20
benchmark value preparation
2014-03-30 18:57:52 -04:00
Victor Widell
5079c1e0c4
Added missing argument to handleError method call.
...
Before the change, it would crash with a very unhelpful error message:
[project path]/node_modules/pg/lib/query.js:92
connection.sync();
^
TypeError: Cannot call method 'sync' of undefined
at Query.handleError ([project path]/node_modules/pg/lib/query.js:92:16)
at Client.connect ([project path]/node_modules/pg/lib/client.js:178:24)
at g (events.js:185:14)
at EventEmitter.emit (events.js:85:17)
at Socket.<anonymous> ([project path]/node_modules/pg/lib/connection.js:60:10)
at Socket.EventEmitter.emit (events.js:85:17)
at TCP.onread (net.js:424:51)
After the change, it reports a much more helpful
error running query [Error: Stream unexpectedly ended during query execution]
2014-03-29 16:45:00 +01:00
Brian C
b12dd4c420
Merge pull request #543 from CartoDB/2.11-remove-ended-connections
...
Remove disconnected clients from the pool
2014-03-22 10:47:53 -05:00
Brian C
f15a027e4e
Merge pull request #545 from CartoDB/master-do-not-assume-pgport
...
Do not assume PGPORT env variable is unset during testing
2014-03-22 10:46:12 -05:00
Sandro Santilli
96e4afdb1b
Have Connection also emit 'end' on stream 'close' event
...
Should fix missing connect callback call with node-0.8 (#534 )
2014-03-18 14:23:05 +01:00