diff --git a/test/integration/client/type-coercion-tests.js b/test/integration/client/type-coercion-tests.js index 2c23f130..fce8ff33 100644 --- a/test/integration/client/type-coercion-tests.js +++ b/test/integration/client/type-coercion-tests.js @@ -145,3 +145,18 @@ helper.pg.connect(helper.config, assert.calls(function(err, client) { sink.add(); }) })) + +if(!helper.config.binary) { + test("postgres date type", function() { + var client = helper.client(); + client.on('error', function(err) { + console.log(err); + client.end(); + }); + client.query("SELECT '2010-10-31'::date", assert.calls(function(err, result){ + assert.isNull(err); + assert.UTCDate(result.rows[0].date, 2010, 9, 31, 0, 0, 0, 0); + })); + client.on('drain', client.end.bind(client)); + }); +}