Skip to content

Commit 0efecb5

Browse files
committed
Doc: update pg_list.h header comments to include XidLists.
I realize that the XidList infrastructure is rather incomplete, but failing to mention it in adjacent comments takes that a bit too far.
1 parent 935277b commit 0efecb5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/include/nodes/pg_list.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@
1515
* Non-empty lists have a header, which will not be relocated as long as the
1616
* list remains non-empty, and an expansible data array.
1717
*
18-
* We support three types of lists:
18+
* We support four types of lists:
1919
*
2020
* T_List: lists of pointers
2121
* (in practice usually pointers to Nodes, but not always;
2222
* declared as "void *" to minimize casting annoyances)
2323
* T_IntList: lists of integers
2424
* T_OidList: lists of Oids
25+
* T_XidList: lists of TransactionIds
26+
* (the XidList infrastructure is less complete than the other cases)
2527
*
26-
* (At the moment, ints and Oids are the same size, but they may not
27-
* always be so; try to be careful to maintain the distinction.)
28+
* (At the moment, ints, Oids, and XIDs are the same size, but they may not
29+
* always be so; be careful to use the appropriate list type for your data.)
2830
*
2931
*
3032
* Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
@@ -50,7 +52,7 @@ typedef union ListCell
5052

5153
typedef struct List
5254
{
53-
NodeTag type; /* T_List, T_IntList, or T_OidList */
55+
NodeTag type; /* T_List, T_IntList, T_OidList, or T_XidList */
5456
int length; /* number of elements currently present */
5557
int max_length; /* allocated length of elements[] */
5658
ListCell *elements; /* re-allocatable array of cells */

0 commit comments

Comments
 (0)