brianc/node-postgres — pull request #332 by two-bit-fool (2013-04-18 02:38:59+00:00)
Title: prevent exceptions in callback from locking up the postgres client

When the code in the callback raises an exception (e.g. an assert in test code) the next query will never fire. This prevents that issue by firing the callback on nextTick.

Note: Tests lifted from https://github.com/NiKnight/node-postgres/commit/d4b99763bc7760bf9add414da2d38510596c69df on https://github.com/brianc/node-postgres/pull/282