if (obj == NULL)
appendStringInfoString(str, "<>");
- else if (IsA(obj, List) || IsA(obj, IntList) || IsA(obj, OidList))
+ else if (IsA(obj, List) || IsA(obj, IntList) || IsA(obj, OidList) ||
+ IsA(obj, XidList))
_outList(str, obj);
/* nodeRead does not want to see { } around these! */
else if (IsA(obj, Integer))
* * Value token nodes (integers, floats, booleans, or strings);
* * General nodes (via parseNodeString() from readfuncs.c);
* * Lists of the above;
- * * Lists of integers or OIDs.
+ * * Lists of integers, OIDs, or TransactionIds.
* The return value is declared void *, not Node *, to avoid having to
* cast it explicitly in callers that assign to fields of different types.
*
/*----------
* Could be an integer list: (i int int ...)
* or an OID list: (o int int ...)
+ * or an XID list: (x int int ...)
* or a list of nodes/values: (node node ...)
*----------
*/
l = lappend_oid(l, val);
}
}
+ else if (tok_len == 1 && token[0] == 'x')
+ {
+ /* List of TransactionIds */
+ for (;;)
+ {
+ TransactionId val;
+ char *endptr;
+
+ token = pg_strtok(&tok_len);
+ if (token == NULL)
+ elog(ERROR, "unterminated List structure");
+ if (token[0] == ')')
+ break;
+ val = (TransactionId) strtoul(token, &endptr, 10);
+ if (endptr != token + tok_len)
+ elog(ERROR, "unrecognized Xid: \"%.*s\"",
+ tok_len, token);
+ l = lappend_xid(l, val);
+ }
+ }
else
{
/* List of other node types */