forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6dfacbf
committed
Add non-decimal integer support to type numeric.
This enhances the numeric type input function, adding support forhexadecimal, octal, and binary integers of any size, up to the limitsof the numeric type.Since6fcda9a, such non-decimal integers have been accepted by theparser as integer literals and passed through to numeric_in(). Thiscommit gives numeric_in() the ability to handle them.While at it, simplify the handling of NaN and infinities, reducing thenumber of calls to pg_strncasecmp(), and arrange for pg_strncasecmp()to not be called at all for regular numbers. This gives a significantperformance improvement for decimal inputs, more than offsetting thesmall performance hit of checking for non-decimal input.Discussion:https://postgr.es/m/CAEZATCV8XShnmT9HZy25C%2Bo78CVOFmUN5EM9FRAZ5xvYTggPMg%40mail.gmail.com1 parent62e1e28 commit6dfacbf
File tree
4 files changed
+405
-95
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+405
-95
lines changed0 commit comments
Comments
(0)