Tom Lane wrote:
Two nitpicks (each applying in 2 places):

First, testing for null rsinfo isn't sufficient, since the resultinfo
mechanism could be used for other things; you need an IsA test too.
Second, is "syntax error" really the most appropriate classification for

(Also, the errmsg text seems a bit out of line with the wording of
comparable errors, but I can't offer better text offhand.)

Thanks for the feedback, Tom. Here's what I ended up with:

    if (!rsinfo || !IsA(rsinfo, ReturnSetInfo))
                errmsg("function returning record called in context "
                       "that cannot accept type record")));


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to