Skip to content

Add ability to opt-in to int8 parsing#427

Merged
brianc merged 1 commit into
masterfrom
parse-big-int
Aug 29, 2013
Merged

Add ability to opt-in to int8 parsing#427
brianc merged 1 commit into
masterfrom
parse-big-int

Conversation

@brianc

@brianc brianc commented Aug 29, 2013

Copy link
Copy Markdown
Owner

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