Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitca1fd0e

Browse files
committed
Move xact.c's partial support for Lists of TransactionIds into pg_list.h.
Needed because lock.c is now going to use the same type of list.
1 parent99a5619 commitca1fd0e

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.225 2006/07/30 02:07:18 alvherre Exp $
13+
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.226 2006/08/27 19:11:46 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -125,14 +125,6 @@ typedef struct TransactionStateData
125125

126126
typedefTransactionStateData*TransactionState;
127127

128-
/*
129-
* childXids is currently implemented as an Oid List, relying on the
130-
* assumption that TransactionIds are no wider than Oid. We use these
131-
* macros to provide some isolation in case that changes in the future.
132-
*/
133-
#definelfirst_xid(lc)((TransactionId) lfirst_oid(lc))
134-
#definelappend_xid(list,datum)lappend_oid(list, (Oid) (datum))
135-
136128
/*
137129
* CurrentTransactionState always points to the current transaction state
138130
* block. It will point to TopTransactionStateData when not in a

‎src/include/nodes/pg_list.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@
2626
* (At the moment, ints and Oids are the same size, but they may not
2727
* always be so; try to be careful to maintain the distinction.)
2828
*
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+
*
2934
*
3035
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
3136
* Portions Copyright (c) 1994, Regents of the University of California
3237
*
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 $
3439
*
3540
*-------------------------------------------------------------------------
3641
*/
@@ -154,6 +159,12 @@ extern intlist_length(List *l);
154159
#definelist_make3_oid(x1,x2,x3)lcons_oid(x1, list_make2_oid(x2, x3))
155160
#definelist_make4_oid(x1,x2,x3,x4) lcons_oid(x1, list_make3_oid(x2, x3, x4))
156161

162+
/*
163+
* Limited support for lists of TransactionIds, mapped onto lists of Oids
164+
*/
165+
#definelfirst_xid(lc)((TransactionId) lfirst_oid(lc))
166+
#definelappend_xid(list,datum)lappend_oid(list, (Oid) (datum))
167+
157168
/*
158169
* foreach -
159170
* a convenience macro which loops through the list

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp