Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to opt-in to int8 parsing #427

Merged
merged 1 commit into from
Aug 29, 2013
Merged

Add ability to opt-in to int8 parsing #427

merged 1 commit into from
Aug 29, 2013

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