Bogdan Vlad writes:
> How can I determine the pg_class oid of the argument type in a
> polymorphic C function when it's called with a table row?
You're confusing pg_class oid with pg_type oid. The type oid
of the function argument is necessarily going to be a *type* oid.
You can look at the pg_
Hello
How can I determine the pg_class oid of the argument type in a
polymorphic C function when it's called with a table row?
PG_FUNCTION_INFO_V1(myfunc);
Datum myfunc(PG_FUNCTION_ARGS)
{
Oid arg_type = get_fn_expr_argtype(fcinfo->flinfo, 0);
elog(ERROR, "arg_type %d", arg_type);
PG_RETURN_NU