script for debugging of text version of type output
This commit is contained in:
parent
05ba85ae79
commit
30246c16d5
23
script/dump-db-types.js
Normal file
23
script/dump-db-types.js
Normal file
@ -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();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user