* BlessTupleDesc - make a completed tuple descriptor useful for SRFs * * Rowtype Datums returned by a function must contain valid type information. * This happens "for free" if the tupdesc came from a relcache entry, but * not if we have manufactured a tupdesc for a transient RECORD datatype. * In that case we have to notify typcache.c of the existence of the type. */
| 2085 | * In that case we have to notify typcache.c of the existence of the type. |
| 2086 | */ |
| 2087 | TupleDesc |
| 2088 | BlessTupleDesc(TupleDesc tupdesc) |
| 2089 | { |
| 2090 | if (tupdesc->tdtypeid == RECORDOID && |
| 2091 | tupdesc->tdtypmod < 0) |
| 2092 | assign_record_type_typmod(tupdesc); |
| 2093 | |
| 2094 | return tupdesc; /* just for notational convenience */ |
| 2095 | } |
| 2096 | |
| 2097 | /* |
| 2098 | * TupleDescGetAttInMetadata - Build an AttInMetadata structure based on the |