Copy-paste error in hash_record_extended() — args[1].isnull not set

Started by zengmanabout 6 hours ago2 messageshackers
Jump to latest
#1zengman
zengman@halodbtech.com

Hi all,

I noticed that in src/backend/utils/adt/rowtypes.c, function hash_record_extended(), there is a copy-paste error:

```c
diff --git a/src/backend/utils/adt/rowtypes.c b/src/backend/utils/adt/rowtypes.c
index e4eb7111ee7..d6126d431d9 100644
--- a/src/backend/utils/adt/rowtypes.c
+++ b/src/backend/utils/adt/rowtypes.c
@@ -2030,7 +2030,7 @@ hash_record_extended(PG_FUNCTION_ARGS)
                        locfcinfo->args[0].value = values[i];
                        locfcinfo->args[0].isnull = false;
                        locfcinfo->args[1].value = Int64GetDatum(seed);
-                       locfcinfo->args[0].isnull = false;
+                       locfcinfo->args[1].isnull = false;
                        element_hash = DatumGetUInt64(FunctionCallInvoke(locfcinfo));

/* We don't expect hash support functions to return null */
```
I think it's worth fixing.

Regards,
Man Zeng

#2Michael Paquier
michael@paquier.xyz
In reply to: zengman (#1)
Re: Copy-paste error in hash_record_extended() — args[1].isnull not set

On Sat, May 30, 2026 at 12:38:02PM +0800, zengman wrote:

I noticed that in src/backend/utils/adt/rowtypes.c, function
hash_record_extended(), there is a copy-paste error:

Clearly. This is not as recent as it looks: 01e658fa74cb. Let's fix
that once we're out of the freeze.
--
Michael