MCPcopy Create free account
hub / github.com/documentdb/documentdb / CreateValuesListForInsert

Function CreateValuesListForInsert

pg_documentdb/src/commands/insert.c:1713–1728  ·  view source on GitHub ↗

indicates the presence of a creation_time column in the table, either at attribute number 4 or 5 */

Source from the content-addressed store, hash-verified

1711
1712/* indicates the presence of a creation_time column in the table, either at attribute number 4 or 5 */
1713static inline List *
1714CreateValuesListForInsert(Const *shardKey, Expr *objectId, Expr *document, AttrNumber
1715 creationTimeVarAttNum)
1716{
1717 if (creationTimeVarAttNum != -1)
1718 {
1719 TimestampTz nowValueTime = (TimestampTz) 000000000000000LL; /* "2000-01-01 00:00:00+00" */
1720 Const *nowValue = makeConst(TIMESTAMPTZOID, -1, InvalidOid, 8,
1721 TimestampTzGetDatum(nowValueTime), false, true);
1722 return list_make4(shardKey, objectId, document, nowValue);
1723 }
1724 else
1725 {
1726 return list_make3(shardKey, objectId, document);
1727 }
1728}
1729
1730
1731/* Build RangeTblEntry for base table */

Callers 2

ProcessInsertionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected