* get_commutator * * Returns the corresponding commutator of an operator. */
| 1650 | * Returns the corresponding commutator of an operator. |
| 1651 | */ |
| 1652 | Oid |
| 1653 | get_commutator(Oid opno) |
| 1654 | { |
| 1655 | HeapTuple tp; |
| 1656 | |
| 1657 | tp = SearchSysCache1(OPEROID, ObjectIdGetDatum(opno)); |
| 1658 | if (HeapTupleIsValid(tp)) |
| 1659 | { |
| 1660 | Form_pg_operator optup = (Form_pg_operator) GETSTRUCT(tp); |
| 1661 | Oid result; |
| 1662 | |
| 1663 | result = optup->oprcom; |
| 1664 | ReleaseSysCache(tp); |
| 1665 | return result; |
| 1666 | } |
| 1667 | else |
| 1668 | return InvalidOid; |
| 1669 | } |
| 1670 | |
| 1671 | /* |
| 1672 | * get_negator |