* get_opcode * * Returns the regproc id of the routine used to implement an * operator given the operator oid. */
| 1426 | * operator given the operator oid. |
| 1427 | */ |
| 1428 | RegProcedure |
| 1429 | get_opcode(Oid opno) |
| 1430 | { |
| 1431 | HeapTuple tp; |
| 1432 | |
| 1433 | tp = SearchSysCache1(OPEROID, ObjectIdGetDatum(opno)); |
| 1434 | if (HeapTupleIsValid(tp)) |
| 1435 | { |
| 1436 | Form_pg_operator optup = (Form_pg_operator) GETSTRUCT(tp); |
| 1437 | RegProcedure result; |
| 1438 | |
| 1439 | result = optup->oprcode; |
| 1440 | ReleaseSysCache(tp); |
| 1441 | return result; |
| 1442 | } |
| 1443 | else |
| 1444 | return (RegProcedure) InvalidOid; |
| 1445 | } |
| 1446 | |
| 1447 | /* |
| 1448 | * get_opname |
no test coverage detected