Skip to content

Commit

Permalink
script for debugging of text version of type output
Browse files Browse the repository at this point in the history
  • Loading branch information
brianc committed Oct 27, 2010
1 parent 05ba85a commit 30246c1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions script/dump-db-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var pg = require(__dirname + '/../lib');
var args = require(__dirname + '/../test/cli');

var queries = [
"select CURRENT_TIMESTAMP",
"select interval '1 day' + interval '1 hour'",
"select TIMESTAMP 'today'"];

queries.forEach(function(query) {

var client = new pg.Client({
user: args.user,
database: args.database,
password: args.password
});
client.connect();
client
.query(query)
.on('row', function(row) {
console.log(row);
client.end();
});
});

0 comments on commit 30246c1

Please sign in to comment.