added script to push out db types

This commit is contained in:
brianc 2010-10-12 21:10:44 -05:00
parent 2617560fc7
commit b1d027c6d1

14
script/list-db-types.js Normal file
View File

@ -0,0 +1,14 @@
var Client = require(__dirname+"/../lib/client");
var client = new Client({
user: 'brian',
database: 'postgres'
});
client.connect();
var query = client.query('select oid, typname, typlen from pg_type order by typname');
query.on('row', function(row) {
console.log(row);
});
query.on('end',function() {
client.disconnect();
})