|
26 | 26 | * (At the moment, ints and Oids are the same size, but they may not |
27 | 27 | * always be so; try to be careful to maintain the distinction.) |
28 | 28 | * |
| 29 | + * There is also limited support for lists of TransactionIds; since these |
| 30 | + * are used in only one or two places, we don't provide a full implementation, |
| 31 | + * but map them onto Oid lists. This effectively assumes that TransactionId |
| 32 | + * is no wider than Oid and both are unsigned types. |
| 33 | + * |
29 | 34 | * |
30 | 35 | * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group |
31 | 36 | * Portions Copyright (c) 1994, Regents of the University of California |
32 | 37 | * |
33 | | - * $PostgreSQL: pgsql/src/include/nodes/pg_list.h,v 1.54 2006/03/05 15:58:57 momjian Exp $ |
| 38 | + * $PostgreSQL: pgsql/src/include/nodes/pg_list.h,v 1.55 2006/08/27 19:11:46 tgl Exp $ |
34 | 39 | * |
35 | 40 | *------------------------------------------------------------------------- |
36 | 41 | */ |
@@ -154,6 +159,12 @@ extern int list_length(List *l); |
154 | 159 | #define list_make3_oid(x1,x2,x3) lcons_oid(x1, list_make2_oid(x2, x3)) |
155 | 160 | #define list_make4_oid(x1,x2,x3,x4) lcons_oid(x1, list_make3_oid(x2, x3, x4)) |
156 | 161 |
|
| 162 | +/* |
| 163 | + * Limited support for lists of TransactionIds, mapped onto lists of Oids |
| 164 | + */ |
| 165 | +#define lfirst_xid(lc) ((TransactionId) lfirst_oid(lc)) |
| 166 | +#define lappend_xid(list, datum) lappend_oid(list, (Oid) (datum)) |
| 167 | + |
157 | 168 | /* |
158 | 169 | * foreach - |
159 | 170 | * a convenience macro which loops through the list |
|
0 commit comments