postgresql/src/backend/utils/adt
Michael Paquier 2576dcfb76 Revert refactoring of hex code to src/common/
This is a combined revert of the following commits:
- c3826f8, a refactoring piece that moved the hex decoding code to
src/common/.  This code was cleaned up by aef8948, as it originally
included no overflow checks in the same way as the base64 routines in
src/common/ used by SCRAM, making it unsafe for its purpose.
- aef8948, a more advanced refactoring of the hex encoding/decoding code
to src/common/ that added sanity checks on the result buffer for hex
decoding and encoding.  As reported by Hans Buschmann, those overflow
checks are expensive, and it is possible to see a performance drop in
the decoding/encoding of bytea or LOs the longer they are.  Simple SQLs
working on large bytea values show a clear difference in perf profile.
- ccf4e27, a cleanup made possible by aef8948.

The reverts of all those commits bring back the performance of hex
decoding and encoding back to what it was in ~13.  Fow now and
post-beta3, this is the simplest option.

Reported-by: Hans Buschmann
Discussion: https://postgr.es/m/1629039545467.80333@nidsa.net
Backpatch-through: 14
2021-08-19 09:20:13 +09:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04: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 Prevent integer overflows in array subscripting calculations. 2021-05-10 10:44:38 -04:00
arrayfuncs.c Prevent integer overflows in array subscripting calculations. 2021-05-10 10:44:38 -04:00
arraysubs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
arrayutils.c Prevent integer overflows in array subscripting calculations. 2021-05-10 10:44:38 -04: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 Add result size as argument of pg_cryptohash_final() for overflow checks 2021-02-15 10:18:34 +09:00
date.c Silence some Coverity warnings and improve code consistency. 2021-04-11 17:02:04 -04:00
datetime.c interval: round values when spilling to months 2021-08-03 12:10:29 -04:00
datum.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
dbsize.c Teach pg_size_pretty and pg_size_bytes about petabytes 2021-07-09 18:56:00 +12:00
domains.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
encode.c Revert refactoring of hex code to src/common/ 2021-08-19 09:20:13 +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 Fix out-of-bound memory access for interval -> char conversion 2021-04-12 11:30:50 +09:00
genfile.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04: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 Fix more confusion in SP-GiST. 2021-04-04 17:57:07 -04: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
int8.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
int.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_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
jsonb.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonbsubs.c Adjust locations which have an incorrect copyright year 2021-06-04 12:19:50 +12:00
jsonfuncs.c Fix typos and grammar in documentation and code comments 2021-04-09 13:53:07 +09:00
jsonpath_exec.c Fix some typos, grammar and style in docs and comments 2021-02-24 16:13:17 +09:00
jsonpath_gram.y Avoid determining regexp subexpression matches, when possible. 2021-08-09 11:26:34 -04:00
jsonpath_scan.l Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonpath.c 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_match.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
like_support.c Avoid divide-by-zero in regex_selectivity() with long fixed prefix. 2021-02-12 16:26:47 -05:00
like.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
lockfuncs.c Rename debug_invalidate_system_caches_always to debug_discard_caches. 2021-07-13 15:01:01 -04:00
mac8.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
mac.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
Makefile Use "-I." in directories holding Bison parsers, for Oracle compilers. 2021-04-12 19:24:41 -07:00
mcxtfuncs.c Reorder superuser check in pg_log_backend_memory_contexts() 2021-06-08 08:53:12 +09:00
misc.c Do not rely on pgstat.h to indirectly include storage/ headers. 2021-04-02 20:02:47 -07:00
multirangetypes_selfuncs.c Fix wording 2021-08-06 20:55:59 +02:00
multirangetypes.c Support for unnest(multirange) 2021-07-18 21:07:24 +03:00
name.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
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
network.c Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
numeric.c Adjust the integer overflow tests in the numeric code. 2021-08-06 21:29:15 +01: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 Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
pg_lsn.c Simplify printing of LSNs 2021-02-23 10:27:02 +01:00
pg_upgrade_support.c Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
pgstatfuncs.c pgstat: split reporting/fetching of bgwriter and checkpointer stats. 2021-08-04 19:16:04 -07: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_gist.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
rangetypes_selfuncs.c Fix wording 2021-08-06 20:55:59 +02:00
rangetypes_spgist.c Fix wording 2021-08-06 20:55:59 +02:00
rangetypes_typanalyze.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
rangetypes.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
regexp.c Let regexp_replace() make use of REG_NOSUB when feasible. 2021-08-09 20:53:25 -04:00
regproc.c Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
ri_triggers.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
rowtypes.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
ruleutils.c Use the "pg_temp" schema alias in EXPLAIN and related output. 2021-07-27 12:03:16 -04:00
selfuncs.c Reject SELECT ... GROUP BY GROUPING SETS (()) FOR UPDATE. 2021-06-01 11:12:56 -04:00
tid.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
timestamp.c Disallow negative strides in date_bin() 2021-07-28 12:10:12 -04:00
trigfuncs.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsginidx.c Convert tsginidx.c's GIN indexing logic to fully ternary operation. 2021-02-16 12:07:14 -05:00
tsgistidx.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 Avoid using ambiguous word "non-negative" in error messages. 2021-07-28 01:20:16 +09: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
tsquery.c Make websearch_to_tsquery() parse text in quotes as a single token 2021-05-03 04:18:19 +03:00
tsrank.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsvector_op.c Convert tsginidx.c's GIN indexing logic to fully ternary operation. 2021-02-16 12:07:14 -05:00
tsvector_parser.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
uuid.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
varbit.c Add bit_count SQL function 2021-03-23 10:13:58 +01:00
varchar.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
varlena.c Revert refactoring of hex code to src/common/ 2021-08-19 09:20:13 +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
xid8funcs.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
xml.c Remove some unnecessary casts in format arguments 2021-08-08 22:08:07 +02:00