Fix hash_array

Peter Eisentraut <peter@eisentraut.org>

Commit: 9b2fd490577bc957429f337cfd72869eb8ef08c9
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2021-09-15T10:15:20Z
Releases: 14.0
Fix hash_array

Commit 054adca641ac1279dc8d9b74fda41948ac35e9a9 neglected to
initialize the type_id field of the synthesized type cache entry, so
it would make a new one on every call.

Also, better use the per-function memory context for this; otherwise
it leaks memory.

Discussion: https://www.postgresql.org/message-id/flat/17158-8a2ba823982537a4%40postgresql.org

Files

PathChange+/−
src/backend/utils/adt/arrayfuncs.c modified +3 −2

Discussion