* getSubscriptingRoutines * * Given the type OID, fetch the type's subscripting methods struct. * Return NULL if type is not subscriptable. * * If typelemp isn't NULL, we also store the type's typelem value there. * This saves some callers an extra catalog lookup. */
| 3728 | * This saves some callers an extra catalog lookup. |
| 3729 | */ |
| 3730 | const struct SubscriptRoutines * |
| 3731 | getSubscriptingRoutines(Oid typid, Oid *typelemp) |
| 3732 | { |
| 3733 | RegProcedure typsubscript = get_typsubscript(typid, typelemp); |
| 3734 | |
| 3735 | if (!OidIsValid(typsubscript)) |
| 3736 | return NULL; |
| 3737 | |
| 3738 | return (const struct SubscriptRoutines *) |
| 3739 | DatumGetPointer(OidFunctionCall0(typsubscript)); |
| 3740 | } |
| 3741 | |
| 3742 | |
| 3743 | /* ---------- STATISTICS CACHE ---------- */ |
no test coverage detected