Skip to content

Conversation

brianc
Copy link
Owner

@brianc brianc commented Aug 29, 2013

Switching the result of all COUNT operations to a string is
a pretty nasty breaking change, and the majority of us aren't
going to be hitting numbers larger than Number.MAX_VALUE

I bumped the major version number, but this makes the upgrade easier. I know in my apps I don't ever use 64bit numbers but I do COUNT(*) all over the place.

fixes #378

to opt in just do

require('pg').defaults.parseInt8 = true

Basically this is a handy shortcut for this:

require('pg').types.setTypeParser(20, 'text', parseInt)

Switching the result of all COUNT operations to a string is
a pretty nasty breaking change, and the majority of us aren't
going to be hitting numbers larger than Number.MAX_VALUE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SELECT COUNT() return typeof string
1 participant