diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-07-12 16:11:04 +0200 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-07-12 16:11:04 +0200 |
commit | 5ca0fe5c8ad7987beee95669124c7e245f2816d8 (patch) | |
tree | 4cf85f19d93b150385d43299d1696923bf1c65c5 /src/backend/nodes/equalfuncs.c | |
parent | d3117fc1a3e87717a57be0153408e5387e265e1b (diff) |
Add copy/equal support for XID lists
Commit f10a025cfe97 added support for List to store Xids, but didn't
handle the new type in all cases. Add some obviously necessary pieces.
As far as I am aware, this is all dead code as far as core code is
concerned, but it seems unacceptable not to have it in case third-party
code wants to rely on this type of list. (Some parts of the List API
remain unimplemented, but that can be fixed as and when needed -- see
lack of list_intersection_oid, list_deduplicate_int as precedents.)
Discussion: https://postgr.es/m/20220708164534.nbejhgt4ajz35p65@alvherre.pgsql
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; |