Closed billreynolds007 closed 4 years ago
I ended up doing npm install pg-types
And then, var types = require('pg').types; var pgTypes = require('pg-types');
I could then do types.setTypeParser(pgTypes.builtins.NUMERIC, function(val) { return parseFloat(val); });
This was also fixed in pg@7.12.1 by brianc/node-postgres#1937.
sounds like this issue should be closed?
One example in the readme.md is types.setTypeParser(types.builtins.TIMESTAMPTZ, parseFn)
This approach var types = require('pg').types; types.setTypeParser(types.builtins.NUMERIC, function(val) { return parseFloat(val); });
shows an error Cannot read property 'NUMERIC' of undefined