mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
added script to push out db types
This commit is contained in:
parent
2617560fc7
commit
b1d027c6d1
14
script/list-db-types.js
Normal file
14
script/list-db-types.js
Normal 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();
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user