MCPcopy Create free account
hub / github.com/apache/cloudberry / getTypeInputInfo

Function getTypeInputInfo

src/backend/utils/cache/lsyscache.c:3474–3500  ·  view source on GitHub ↗

* getTypeInputInfo * * Get info needed for converting values of a type to internal form */

Source from the content-addressed store, hash-verified

3472 * Get info needed for converting values of a type to internal form
3473 */
3474void
3475getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam)
3476{
3477 HeapTuple typeTuple;
3478 Form_pg_type pt;
3479
3480 typeTuple = SearchSysCache1(TYPEOID, ObjectIdGetDatum(type));
3481 if (!HeapTupleIsValid(typeTuple))
3482 elog(ERROR, "cache lookup failed for type %u", type);
3483 pt = (Form_pg_type) GETSTRUCT(typeTuple);
3484
3485 if (!pt->typisdefined)
3486 ereport(ERROR,
3487 (errcode(ERRCODE_UNDEFINED_OBJECT),
3488 errmsg("type %s is only a shell",
3489 format_type_be(type))));
3490 if (!OidIsValid(pt->typinput))
3491 ereport(ERROR,
3492 (errcode(ERRCODE_UNDEFINED_FUNCTION),
3493 errmsg("no input function available for type %s",
3494 format_type_be(type))));
3495
3496 *typInput = pt->typinput;
3497 *typIOParam = getTypeIOParam(typeTuple);
3498
3499 ReleaseSysCache(typeTuple);
3500}
3501
3502/*
3503 * getTypeOutputInfo

Callers 15

hstore_populate_recordFunction · 0.85
pltcl_SPI_prepareFunction · 0.85
_sv_to_datum_finfoFunction · 0.85
plperl_spi_prepareFunction · 0.85
PLy_output_setup_funcFunction · 0.85
parse_fcall_argumentsFunction · 0.85
exec_bind_messageFunction · 0.85
prepare_column_cacheFunction · 0.85
domain_state_setupFunction · 0.85
record_inFunction · 0.85
BeginCopyFromFunction · 0.85

Calls 7

SearchSysCache1Function · 0.85
ObjectIdGetDatumFunction · 0.85
format_type_beFunction · 0.85
getTypeIOParamFunction · 0.85
ReleaseSysCacheFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected