Haribabu Kommi <kommi.haribabu@gmail.com> writes:
> Accessing of NULL pointer leads to crash. Attached quick simple patch fixes
> the problem.
While that stops the crash, it doesn't do what we want, which is to
return a valid tupdesc. Without that you get "set-valued function called
in context that cannot accept a set" errors. I think the right fix is
to force a call of update_cached_tupdesc so that there always is a
tupdesc to copy.
regards, tom lane