postgresql/src/backend/utils/adt
Tom Lane 69036aafb9 Simplify jsonfuncs.c code by using strtoint() not strtol().
Explicitly testing for INT_MIN and INT_MAX isn't particularly good
style; it's tedious and may draw useless compiler warnings on
machines where int and long are the same width.  We invented
strtoint() precisely for this usage, so use that instead.

While here, remove gratuitous variations in the way the tests for
did-strtoint-succeed were spelled.  Also, avoid attempting to
negate INT_MIN; that would probably work given that the result
is implicitly cast to uint32, but I think it's nominally undefined
behavior.

Per gripe from Ranier Vilela, though this isn't his proposed patch.

Discussion: https://postgr.es/m/CAEudQAqge3QfzoBRhe59QrB_5g+NmQUj2QpzqZ9Nc7QepXGAEw@mail.gmail.com
2021-02-11 12:49:22 -05:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
Makefile Implementation of subscripting for jsonb 2021-01-31 23:50:40 +03:00
acl.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
amutils.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
array_expanded.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
array_selfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
array_typanalyze.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
array_userfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
arrayfuncs.c Rethink the "read/write parameter" mechanism in pl/pgsql. 2021-01-04 12:39:27 -05:00
arraysubs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
arrayutils.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
ascii.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
bool.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
cash.c Expose internal function for converting int64 to numeric 2020-09-09 20:16:28 +02:00
char.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
cryptohashfuncs.c Refactor SQL functions of SHA-2 in cryptohashfuncs.c 2021-01-28 16:13:26 +09:00
date.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
datetime.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
datum.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
dbsize.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
domains.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
encode.c Rework refactoring of hex and encoding routines 2021-01-14 11:13:24 +09:00
enum.c Rename "enum blacklist" to "uncommitted enums". 2021-01-05 12:38:48 +13:00
expandeddatum.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
expandedrecord.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
float.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
format_type.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
formatting.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
genfile.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
geo_ops.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
geo_selfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
geo_spgist.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
inet_cidr_ntop.c Avoid conflicts with library versions of inet_net_ntop() and friends. 2019-08-18 19:27:23 -04:00
inet_net_pton.c Avoid conflicts with library versions of inet_net_ntop() and friends. 2019-08-18 19:27:23 -04:00
int.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
int8.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
json.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonb.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonb_gin.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonb_op.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonb_util.c Implementation of subscripting for jsonb 2021-01-31 23:50:40 +03:00
jsonbsubs.c Get rid of unnecessary memory allocation in jsonb_subscript_assign() 2021-02-01 14:06:02 +03:00
jsonfuncs.c Simplify jsonfuncs.c code by using strtoint() not strtol(). 2021-02-11 12:49:22 -05:00
jsonpath.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonpath_exec.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonpath_gram.y Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonpath_scan.l Update copyright for 2021 2021-01-02 13:06:25 -05:00
levenshtein.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
like.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
like_match.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
like_support.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
lockfuncs.c Revert "Display the time when the process started waiting for the lock, in pg_locks." 2021-02-09 18:30:40 +09:00
mac.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
mac8.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
mcxtfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
misc.c Build in some knowledge about foreign-key relationships in the catalogs. 2021-02-02 17:11:55 -05:00
multirangetypes.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
multirangetypes_selfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
name.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
network.c Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
network_gist.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
network_selfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
network_spgist.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
numeric.c Add an explicit cast to double when using fabs(). 2021-01-05 11:52:42 +00:00
numutils.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
oid.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
oracle_compat.c Add bytea equivalents of ltrim() and rtrim(). 2021-01-18 15:11:32 -05:00
orderedsetaggs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
partitionfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_locale.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_lsn.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_upgrade_support.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pgstatfuncs.c Add pg_stat_database counters for sessions and session time 2021-01-17 13:52:31 +01:00
pseudotypes.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
quote.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
rangetypes.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
rangetypes_gist.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
rangetypes_selfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
rangetypes_spgist.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
rangetypes_typanalyze.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
regexp.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
regproc.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
ri_triggers.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
rowtypes.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
ruleutils.c SEARCH and CYCLE clauses 2021-02-01 14:32:51 +01:00
selfuncs.c Fix pull_varnos' miscomputation of relids set for a PlaceHolderVar. 2021-01-21 15:37:23 -05:00
tid.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
timestamp.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
trigfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsginidx.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsgistidx.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsquery.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsquery_cleanup.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsquery_gist.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsquery_op.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsquery_rewrite.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsquery_util.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsrank.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsvector.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsvector_op.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsvector_parser.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
uuid.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
varbit.c Fix integer-overflow corner cases in substring() functions. 2021-01-04 18:32:44 -05:00
varchar.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
varlena.c Rework refactoring of hex and encoding routines 2021-01-14 11:13:24 +09:00
version.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
windowfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
xid.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
xid8funcs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
xml.c Simplify some comments in xml.c 2021-01-04 19:47:58 +09:00