/* Static state for pg_strtok */ staticconstchar *pg_strtok_ptr = NULL;
/* State flag that determines how readfuncs.c should treat location fields */ #ifdef DEBUG_NODE_TESTS_ENABLED bool restore_location_fields = false; #endif
if (token == NULL) /* need to read a token? */
{
token = pg_strtok(&tok_len);
if (token == NULL) /* end of input */ return NULL;
}
type = nodeTokenType(token, tok_len);
switch ((int) type)
{ case LEFT_BRACE:
result = parseNodeString();
token = pg_strtok(&tok_len); if (token == NULL || token[0] != '}')
elog(ERROR, "did not find '}' at end of input node"); break; case LEFT_PAREN:
{
List *l = NIL;
/*---------- *Couldbeanintegerlist:(iintint...) *oranOIDlist:(ointint...) *oranXIDlist:(xintint...) *orabitmapset:(bintint...) *oralistofnodes/values:(nodenode...) *----------
*/
token = pg_strtok(&tok_len); if (token == NULL)
elog(ERROR, "unterminated List structure"); if (tok_len == 1 && token[0] == 'i')
{ /* List of integers */ for (;;)
{ int val; char *endptr;
token = pg_strtok(&tok_len); if (token == NULL)
elog(ERROR, "unterminated List structure"); if (token[0] == ')') break;
val = (int) strtol(token, &endptr, 10); if (endptr != token + tok_len)
elog(ERROR, "unrecognized integer: \"%.*s\"",
tok_len, token);
l = lappend_int(l, val);
}
result = (Node *) l;
} elseif (tok_len == 1 && token[0] == 'o')
{ /* List of OIDs */ for (;;)
{
Oid val; char *endptr;
token = pg_strtok(&tok_len); if (token == NULL)
elog(ERROR, "unterminated List structure"); if (token[0] == ')') break;
val = (Oid) strtoul(token, &endptr, 10); if (endptr != token + tok_len)
elog(ERROR, "unrecognized OID: \"%.*s\"",
tok_len, token);
l = lappend_oid(l, val);
}
result = (Node *) l;
} elseif (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);
}
result = (Node *) l;
} elseif (tok_len == 1 && token[0] == 'b')
{ /* Bitmapset -- see also _readBitmapset() */
Bitmapset *bms = NULL;
for (;;)
{ int val; char *endptr;
token = pg_strtok(&tok_len); if (token == NULL)
elog(ERROR, "unterminated Bitmapset structure"); if (tok_len == 1 && token[0] == ')') break;
val = (int) strtol(token, &endptr, 10); if (endptr != token + tok_len)
elog(ERROR, "unrecognized integer: \"%.*s\"",
tok_len, token);
bms = bms_add_member(bms, val);
}
result = (Node *) bms;
} else
{ /* List of other node types */ for (;;)
{ /* We have already scanned next token... */ if (token[0] == ')') break;
l = lappend(l, nodeRead(token, tok_len));
token = pg_strtok(&tok_len); if (token == NULL)
elog(ERROR, "unterminated List structure");
}
result = (Node *) l;
} break;
} case RIGHT_PAREN:
elog(ERROR, "unexpected right parenthesis");
result = NULL; /* keep compiler happy */ break; case OTHER_TOKEN: if (tok_len == 0)
{ /* must be "<>" --- represents a null pointer */
result = NULL;
} else
{
elog(ERROR, "unrecognized token: \"%.*s\"", tok_len, token);
result = NULL; /* keep compiler happy */
} break; case T_Integer:
/* *weknowthatthetokenterminatesonacharatoiwillstopat
*/
result = (Node *) makeInteger(atoi(token)); break; case T_Float:
{ char *fval = (char *) palloc(tok_len + 1);
memcpy(fval, token, tok_len);
fval[tok_len] = '\0';
result = (Node *) makeFloat(fval);
} break; case T_Boolean:
result = (Node *) makeBoolean(token[0] == 't'); break; case T_String: /* need to remove leading and trailing quotes, and backslashes */
result = (Node *) makeString(debackslash(token + 1, tok_len - 2)); break; case T_BitString: /* need to remove backslashes, but there are no quotes */
result = (Node *) makeBitString(debackslash(token, tok_len)); break; default:
elog(ERROR, "unrecognized node type: %d", (int) type);
result = NULL; /* keep compiler happy */ break;
}
return result;
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.17Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.