* get_typisdefined * * Given the type OID, determine whether the type is defined * (if not, it's only a shell). */
| 2771 | * (if not, it's only a shell). |
| 2772 | */ |
| 2773 | bool |
| 2774 | get_typisdefined(Oid typid) |
| 2775 | { |
| 2776 | HeapTuple tp; |
| 2777 | |
| 2778 | tp = SearchSysCache1(TYPEOID, ObjectIdGetDatum(typid)); |
| 2779 | if (HeapTupleIsValid(tp)) |
| 2780 | { |
| 2781 | Form_pg_type typtup = (Form_pg_type) GETSTRUCT(tp); |
| 2782 | bool result; |
| 2783 | |
| 2784 | result = typtup->typisdefined; |
| 2785 | ReleaseSysCache(tp); |
| 2786 | return result; |
| 2787 | } |
| 2788 | else |
| 2789 | return false; |
| 2790 | } |
| 2791 | |
| 2792 | /* |
| 2793 | * get_typlen |
no test coverage detected