1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-29 13:56:47 +03:00

Fix wrong construct_array_builtin() call in GUCArrayDelete()

The current code unintentionally uses the wrong datum to construct an array.
The bug was introduced by 096dd80f3c, so no backpatching is needed.

Reported-by: David Steele
Discussion: https://postgr.es/m/d46f9265-ff3c-6743-2278-6772598233c2%40pgmasters.net
Author: Nathan Bossart
Reviewed-by: David Steele, Tom Lane
This commit is contained in:
Alexander Korotkov 2023-04-27 22:06:14 +03:00
parent df38157d94
commit db93e739ac

View File

@ -6496,7 +6496,8 @@ GUCArrayDelete(ArrayType *array, ArrayType **usersetArray, const char *name)
{ {
newarray = construct_array_builtin(&d, 1, TEXTOID); newarray = construct_array_builtin(&d, 1, TEXTOID);
if (usersetArray) if (usersetArray)
newUsersetArray = construct_array_builtin(&d, 1, BOOLOID); newUsersetArray = construct_array_builtin(&userSetDatum, 1,
BOOLOID);
} }
index++; index++;