summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2023-08-22 11:57:08 -0400
committerAndrew Dunstan <andrew@dunslane.net>2023-08-22 15:16:01 -0400
commit75f323aa1c1ec88f9781cb6d9307e42b820b26f0 (patch)
tree7bb1a8d8429a7c2a6265af3189019510d4db79a0 /src/tools
parentad8753a3a717709f5072817636e6845a2d690162 (diff)
Cache by-reference missing values in a long lived context
Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of the datum in the TopMemoryContext. Since we first search for the value this only needs to be done once per session for any such value. Original complaint from Tom Lane, idea for mitigation by Andrew Dunstan, tweaked by Tom Lane. Backpatch to version 11 where missing values were introduced. Discussion: https://postgr.es/m/1306569.1687978174@sss.pgh.pa.us
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/pgindent/typedefs.list1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 826d5d6e083..4892da5ebb1 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -3409,6 +3409,7 @@ mbstr_verifier
memoize_hash
memoize_iterator
metastring
+missing_cache_key
mix_data_t
mixedStruct
mode_t