为src/common/backend/parser下的文件添加了部分注释 #29
|
|
@ -135,6 +135,7 @@ Oid LookupOperNameTypeNames(
|
|||
{
|
||||
Oid leftoid, rightoid;
|
||||
|
||||
/* fetch type's OID by given TypeNames */
|
||||
if (oprleft == NULL)
|
||||
leftoid = InvalidOid;
|
||||
else
|
||||
|
|
@ -174,9 +175,9 @@ void get_sort_group_operators(
|
|||
{
|
||||
TypeCacheEntry* typentry = NULL;
|
||||
int cache_flags;
|
||||
Oid lt_opr; // Oid of '<'
|
||||
Oid eq_opr; // Oid of '='
|
||||
Oid gt_opr; // Oid of '>'
|
||||
Oid lt_opr; // '<'
|
||||
Oid eq_opr; // '='
|
||||
Oid gt_opr; // '>'
|
||||
bool hashable = false;
|
||||
|
||||
/*
|
||||
|
|
@ -218,7 +219,11 @@ void get_sort_group_operators(
|
|||
*isHashable = hashable;
|
||||
}
|
||||
|
||||
/* given operator tuple, return the operator OID */
|
||||
/*
|
||||
* given operator tuple, return the operator OID.
|
||||
*
|
||||
* This is a wrapper of HeapTupleGetOid().
|
||||
*/
|
||||
Oid oprid(Operator op)
|
||||
{
|
||||
return HeapTupleGetOid(op);
|
||||
|
|
@ -508,9 +513,13 @@ Oid compatible_oper_opid(List* op, Oid arg1, Oid arg2, bool noError)
|
|||
Operator optup;
|
||||
Oid result;
|
||||
|
||||
/* given binary opname and OIDs of its args, find the operator tuple. */
|
||||
optup = compatible_oper(NULL, op, arg1, arg2, noError, -1);
|
||||
if (optup != NULL) {
|
||||
/* given operator tuple, return the operator OID. */
|
||||
result = oprid(optup);
|
||||
|
||||
/* release the unit of optup in SysCache. */
|
||||
ReleaseSysCache(optup);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue