aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/nodes/copyfuncs.c5
-rw-r--r--src/backend/nodes/equalfuncs.c8
-rw-r--r--src/test/modules/test_oat_hooks/test_oat_hooks.c3
3 files changed, 14 insertions, 2 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index b8e40a4195a..e76fda8eba3 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -187,11 +187,12 @@ copyObjectImpl(const void *from)
break;
/*
- * Lists of integers and OIDs don't need to be deep-copied, so we
- * perform a shallow copy via list_copy()
+ * Lists of integers, OIDs and XIDs don't need to be deep-copied,
+ * so we perform a shallow copy via list_copy()
*/
case T_IntList:
case T_OidList:
+ case T_XidList:
retval = list_copy(from);
break;
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 8d54e1a4866..0373aa30fe9 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -188,6 +188,13 @@ _equalList(const List *a, const List *b)
return false;
}
break;
+ case T_XidList:
+ forboth(item_a, a, item_b, b)
+ {
+ if (lfirst_xid(item_a) != lfirst_xid(item_b))
+ return false;
+ }
+ break;
default:
elog(ERROR, "unrecognized list node type: %d",
(int) a->type);
@@ -238,6 +245,7 @@ equal(const void *a, const void *b)
case T_List:
case T_IntList:
case T_OidList:
+ case T_XidList:
retval = _equalList(a, b);
break;
diff --git a/src/test/modules/test_oat_hooks/test_oat_hooks.c b/src/test/modules/test_oat_hooks/test_oat_hooks.c
index 0ad77e743de..1f40d632e07 100644
--- a/src/test/modules/test_oat_hooks/test_oat_hooks.c
+++ b/src/test/modules/test_oat_hooks/test_oat_hooks.c
@@ -1122,6 +1122,9 @@ nodetag_to_string(NodeTag tag)
case T_OidList:
return "OidList";
break;
+ case T_XidList:
+ return "XidList";
+ break;
case T_ExtensibleNode:
return "ExtensibleNode";
break;