You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.
In #51 I noted how it's not possible to change pg.defaults via Massive. node-postgres allows overriding a few defaults. Here's an example:
varpg=require('pg');pg.defaults.poolSize=25;//pool is created on first call to pg.connectpg.connect(function(err,client,done){done();});pg.defaults.poolSize=2;//pool still has a size of 25pg.connect(function(err,client,done){done();});//creating a new pool by using a different connection string//will create this second pool with a size of 2pg.connect('other-pool',function(err,client,done){});
The runner class (DB.prototype.query and DB.prototype.stream, specifically) could be extended to allow changing these defaults.
The text was updated successfully, but these errors were encountered:
I think @dmfay we could accommodate this on startup - maybe tacking on pgDefaults option or something in the connection? Changing the poolsize is particularly interesting although the date issue referenced in #51 will cause more issues but... whatever :).
Agree about adding a pgDefaults _option _on start-up. There are a number of reasons that would be handy, including (for those who choose to go this route) setting the option parseInputDatesAsUTC mentioned by the OP in #51.
Pool size management is the big win here I think. As far as the date stuff, to me that's just JS quirkiness, and Massive already does the correct thing by staying out of the way and allowing the irritating, but "normal" JS behavior to remain.
It'd be pretty great to be able to turn on parseInt8 and get counts back as proper numbers too! Definitely agree with John that it needs to be something the user has to explicitly enable themselves though.
In #51 I noted how it's not possible to change
pg.defaults
via Massive.node-postgres
allows overriding a few defaults. Here's an example:The runner class (
DB.prototype.query
andDB.prototype.stream
, specifically) could be extended to allow changing these defaults.The text was updated successfully, but these errors were encountered: